mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-09 06:13:43 +00:00
Adapt docker-compose-gpu.yml to use DPR by default (#1810)
* Adapt docker-compose-gpu.yml to use DPR by default * Update the comments * Change the ES image * Increase the context window and allow no-answers in the DPR pipeline too * Re-enable file upload in GPU version * Add env var without value and a commet to explain it
This commit is contained in:
parent
9ee0ea0c17
commit
1a4ee21b92
@ -1,5 +1,6 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
|
|
||||||
haystack-api:
|
haystack-api:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@ -22,19 +23,23 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
# See rest_api/pipelines.yaml for configurations of Search & Indexing Pipeline.
|
# See rest_api/pipelines.yaml for configurations of Search & Indexing Pipeline.
|
||||||
- DOCUMENTSTORE_PARAMS_HOST=elasticsearch
|
- DOCUMENTSTORE_PARAMS_HOST=elasticsearch
|
||||||
|
- PIPELINE_YAML_PATH=/home/user/rest_api/pipeline/pipelines_dpr.yaml
|
||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch
|
- 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'"
|
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:
|
elasticsearch:
|
||||||
# This will start an empty elasticsearch instance (so you have to add your documents yourself)
|
# This will start an empty elasticsearch instance (so you have to add your documents yourself)
|
||||||
#image: "elasticsearch:7.9.2"
|
#image: "elasticsearch:7.9.2"
|
||||||
# If you want a demo image instead that is "ready-to-query" with some indexed Game of Thrones articles:
|
# If you want a demo image instead that is "ready-to-query" with some indexed articles
|
||||||
image: "deepset/elasticsearch-game-of-thrones"
|
# about countries and capital cities from Wikipedia:
|
||||||
|
image: "deepset/elasticsearch-countries-and-capitals"
|
||||||
ports:
|
ports:
|
||||||
- 9200:9200
|
- 9200:9200
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- discovery.type=single-node
|
- discovery.type=single-node
|
||||||
|
|
||||||
ui:
|
ui:
|
||||||
build:
|
build:
|
||||||
context: ui
|
context: ui
|
||||||
@ -46,4 +51,5 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- API_ENDPOINT=http://haystack-api:8000
|
- API_ENDPOINT=http://haystack-api:8000
|
||||||
- EVAL_FILE=eval_labels_example.csv
|
- 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'"
|
command: "/bin/bash -c 'sleep 15 && streamlit run webapp.py'"
|
||||||
|
|||||||
@ -20,8 +20,9 @@ services:
|
|||||||
elasticsearch:
|
elasticsearch:
|
||||||
# This will start an empty elasticsearch instance (so you have to add your documents yourself)
|
# This will start an empty elasticsearch instance (so you have to add your documents yourself)
|
||||||
#image: "elasticsearch:7.9.2"
|
#image: "elasticsearch:7.9.2"
|
||||||
# If you want a demo image instead that is "ready-to-query" with some indexed Game of Thrones articles:
|
# If you want a demo image instead that is "ready-to-query" with some indexed articles
|
||||||
image: "deepset/elasticsearch-game-of-thrones"
|
# about countries and capital cities from Wikipedia:
|
||||||
|
image: "deepset/elasticsearch-countries-and-capitals"
|
||||||
ports:
|
ports:
|
||||||
- 9200:9200
|
- 9200:9200
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
|
|||||||
@ -14,6 +14,8 @@ components: # define all the building-blocks for Pipeline
|
|||||||
type: FARMReader # Haystack Class name for the component
|
type: FARMReader # Haystack Class name for the component
|
||||||
params:
|
params:
|
||||||
model_name_or_path: deepset/roberta-base-squad2
|
model_name_or_path: deepset/roberta-base-squad2
|
||||||
|
context_window_size: 1000
|
||||||
|
return_no_answer: true
|
||||||
- name: TextFileConverter
|
- name: TextFileConverter
|
||||||
type: TextConverter
|
type: TextConverter
|
||||||
- name: PDFFileConverter
|
- name: PDFFileConverter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user