Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/docs, required services, midas predictor docker #113

Merged
merged 4 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,17 @@ docker-compose -f docker-compose.yml -f assistant_dists/dream/docker-compose.ove
**Please note, that DeepPavlov Dream components require a lot of resources.**
Refer to the [components](#components) section to see estimated requirements.
```
docker-compose -f docker-compose.yml -f assistant_dists/dream/docker-compose.override.yml up --build
docker-compose -f docker-compose.yml -f assistant_dists/dream/docker-compose.override.yml -f assistant_dists/dream/dev.yml up --build
```
We've also included a config with GPU allocations for multi-GPU environments.

```
AGENT_PORT=4242 docker-compose -f docker-compose.yml -f assistant_dists/dream/docker-compose.override.yml -f assistant_dists/dream/test.yml up
AGENT_PORT=4242 docker-compose -f docker-compose.yml -f assistant_dists/dream/docker-compose.override.yml -f assistant_dists/dream/dev.yml -f assistant_dists/dream/test.yml up
```
When you need to restart particular docker container without re-building (make sure mapping in `assistant_dists/dream/dev.yml` is correct):
```
AGENT_PORT=4242 docker-compose -f docker-compose.yml -f assistant_dists/dream/docker-compose.override.yml -f assistant_dists/dream/dev.yml restart container-name
```


### Let's chat
In a separate terminal tab run:
Expand Down
8 changes: 1 addition & 7 deletions annotators/midas_predictor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# syntax=docker/dockerfile:experimental

FROM pytorch/pytorch:1.4-cuda10.1-cudnn7-runtime

RUN apt-get update && apt-get install -y --allow-unauthenticated wget && rm -rf /var/lib/apt/lists/*
FROM python:3.9.1

COPY ./requirements.txt /src/requirements.txt

Expand All @@ -20,6 +16,4 @@ ARG SERVICE_PORT
ENV SERVICE_NAME ${SERVICE_NAME}
ENV SERVICE_PORT ${SERVICE_PORT}

WORKDIR /src

CMD gunicorn --workers=1 server:app -b 0.0.0.0:8121
2 changes: 1 addition & 1 deletion assistant_dists/dream/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
dff-funfact-skill:8104, dff-bot-persona-skill:8105, news-api-annotator:8112,
dff-gossip-skill:8109, dff-wiki-skill:8111, dff-gaming-skill:8115, topic-recommendation:8113,
user-persona-extractor:8114, wiki-facts:8116, dff-music-skill:8099, entity-detection:8103, dff-art-skill:8117,
dff-template-skill:8120"
midas-predictor:8121, dff-template-skill:8120"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-480}
convers-evaluator-annotator:
env_file: [.env]
Expand Down
38 changes: 15 additions & 23 deletions assistant_dists/dream/pipeline_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"connector": "connectors.ner",
"dialog_formatter": "state_formatters.dp_formatters:ner_formatter_last_bot_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"bot_annotator_selector",
"post_annotators.sentseg"
],
Expand All @@ -115,7 +115,7 @@
"connector": "connectors.sentrewrite",
"dialog_formatter": "state_formatters.dp_formatters:sent_rewrite_formatter_w_o_last_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"bot_annotator_selector",
"post_annotators.sentseg",
"post_annotators.ner"
Expand Down Expand Up @@ -151,7 +151,7 @@
"connector": "connectors.sentseg",
"dialog_formatter": "state_formatters.dp_formatters:preproc_last_human_utt_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing"
],
"state_manager_method": "add_annotation"
Expand All @@ -164,7 +164,7 @@
},
"dialog_formatter": "state_formatters.dp_formatters:preproc_last_human_utt_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing"
],
"state_manager_method": "add_annotation"
Expand All @@ -177,10 +177,8 @@
},
"dialog_formatter": "state_formatters.dp_formatters:last_human_utt_nounphrases",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"annotators.spelling_preprocessing"
],
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.entity_detection",
"annotators.spacy_nounphrases"
],
Expand All @@ -194,7 +192,7 @@
},
"dialog_formatter": "state_formatters.dp_formatters:preproc_last_human_utt_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing"
],
"state_manager_method": "add_annotation"
Expand All @@ -218,7 +216,7 @@
"dialog_formatter": "state_formatters.dp_formatters:last_utt_sentseg_segments_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.sentseg"
]
Expand Down Expand Up @@ -247,7 +245,7 @@
"dialog_formatter": "state_formatters.dp_formatters:fact_retrieval_formatter_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.sentseg",
"annotators.entity_linking"
Expand All @@ -258,7 +256,7 @@
"dialog_formatter": "state_formatters.dp_formatters:ner_formatter_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.sentseg"
]
Expand All @@ -272,7 +270,7 @@
"dialog_formatter": "state_formatters.dp_formatters:preproc_last_human_utt_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.sentseg"
]
Expand All @@ -299,10 +297,8 @@
"dialog_formatter": "state_formatters.dp_formatters:el_formatter_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"annotators.ner"
],
"previous_services": [
"annotators.ner",
"annotators.entity_detection",
"annotators.spacy_nounphrases"
]
Expand All @@ -325,7 +321,7 @@
"dialog_formatter": "state_formatters.dp_formatters:sent_rewrite_formatter_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.sentseg",
"annotators.ner",
Expand All @@ -340,7 +336,7 @@
},
"dialog_formatter": "state_formatters.dp_formatters:utt_sentseg_punct_dialog",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing",
"annotators.sentseg"
],
Expand All @@ -354,7 +350,7 @@
},
"dialog_formatter": "state_formatters.dp_formatters:preproc_last_human_utt_dialog_w_hist",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"required_previous_services": [
"previous_services": [
"annotators.spelling_preprocessing"
],
"state_manager_method": "add_annotation"
Expand Down Expand Up @@ -427,7 +423,7 @@
"dialog_formatter": "state_formatters.dp_formatters:midas_predictor_formatter",
"response_formatter": "state_formatters.dp_formatters:simple_formatter_service",
"state_manager_method": "add_annotation",
"required_previous_services": [
"previous_services": [
"annotators.midas_classification",
"annotators.combined_classification"
]
Expand All @@ -444,10 +440,6 @@
"previous_services": [
"annotators"
],
"required_previous_services": [
"annotators.badlisted_words",
"annotators.asr"
],
"tags": [
"selector"
]
Expand Down