diff --git a/docker-compose-gpu.yml b/docker-compose-gpu.yml index 056c69aae..c9f4420d7 100644 --- a/docker-compose-gpu.yml +++ b/docker-compose-gpu.yml @@ -1,5 +1,6 @@ version: "3" services: + haystack-api: build: context: . @@ -22,19 +23,23 @@ services: environment: # See rest_api/pipelines.yaml for configurations of Search & Indexing Pipeline. - DOCUMENTSTORE_PARAMS_HOST=elasticsearch + - PIPELINE_YAML_PATH=/home/user/rest_api/pipeline/pipelines_dpr.yaml depends_on: - elasticsearch command: "/bin/bash -c 'sleep 10 && gunicorn rest_api.application:app -b 0.0.0.0 -k uvicorn.workers.UvicornWorker --workers 1 --timeout 180'" + elasticsearch: # This will start an empty elasticsearch instance (so you have to add your documents yourself) #image: "elasticsearch:7.9.2" - # If you want a demo image instead that is "ready-to-query" with some indexed Game of Thrones articles: - image: "deepset/elasticsearch-game-of-thrones" + # If you want a demo image instead that is "ready-to-query" with some indexed articles + # about countries and capital cities from Wikipedia: + image: "deepset/elasticsearch-countries-and-capitals" ports: - 9200:9200 restart: on-failure environment: - discovery.type=single-node + ui: build: context: ui @@ -46,4 +51,5 @@ services: environment: - API_ENDPOINT=http://haystack-api:8000 - EVAL_FILE=eval_labels_example.csv + - HAYSTACK_UI_DISABLE_FILE_UPLOAD # docker-compose run -e HAYSTACK_UI_DISABLE_FILE_UPLOAD=1 ... command: "/bin/bash -c 'sleep 15 && streamlit run webapp.py'" diff --git a/docker-compose.yml b/docker-compose.yml index 1306d3079..380b1ad32 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,8 +20,9 @@ services: elasticsearch: # This will start an empty elasticsearch instance (so you have to add your documents yourself) #image: "elasticsearch:7.9.2" - # If you want a demo image instead that is "ready-to-query" with some indexed Game of Thrones articles: - image: "deepset/elasticsearch-game-of-thrones" + # If you want a demo image instead that is "ready-to-query" with some indexed articles + # about countries and capital cities from Wikipedia: + image: "deepset/elasticsearch-countries-and-capitals" ports: - 9200:9200 restart: on-failure diff --git a/rest_api/pipeline/pipelines_dpr.yaml b/rest_api/pipeline/pipelines_dpr.yaml index 23ec38da3..78220d2b0 100644 --- a/rest_api/pipeline/pipelines_dpr.yaml +++ b/rest_api/pipeline/pipelines_dpr.yaml @@ -14,6 +14,8 @@ components: # define all the building-blocks for Pipeline type: FARMReader # Haystack Class name for the component params: model_name_or_path: deepset/roberta-base-squad2 + context_window_size: 1000 + return_no_answer: true - name: TextFileConverter type: TextConverter - name: PDFFileConverter