diff --git a/README.md b/README.md index e365a48f24..9447d3592c 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/annotators/midas_predictor/Dockerfile b/annotators/midas_predictor/Dockerfile index 8aa94bb217..52fd3f1955 100644 --- a/annotators/midas_predictor/Dockerfile +++ b/annotators/midas_predictor/Dockerfile @@ -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 @@ -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 diff --git a/assistant_dists/dream/docker-compose.override.yml b/assistant_dists/dream/docker-compose.override.yml index f9e10b8da8..9cb56817a3 100644 --- a/assistant_dists/dream/docker-compose.override.yml +++ b/assistant_dists/dream/docker-compose.override.yml @@ -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] diff --git a/assistant_dists/dream/pipeline_conf.json b/assistant_dists/dream/pipeline_conf.json index f05273aa43..5f91a3dc2c 100644 --- a/assistant_dists/dream/pipeline_conf.json +++ b/assistant_dists/dream/pipeline_conf.json @@ -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" ], @@ -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" @@ -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" @@ -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" @@ -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" ], @@ -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" @@ -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" ] @@ -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" @@ -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" ] @@ -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" ] @@ -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" ] @@ -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", @@ -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" ], @@ -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" @@ -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" ] @@ -444,10 +440,6 @@ "previous_services": [ "annotators" ], - "required_previous_services": [ - "annotators.badlisted_words", - "annotators.asr" - ], "tags": [ "selector" ]