forked from deepset-ai/haystack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (53 loc) · 2.17 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: "3"
services:
haystack-api:
build:
context: .
dockerfile: Dockerfile
image: "deepset/haystack-cpu:latest"
# Mount custom Pipeline YAML and custom Components.
# volumes:
# - ./rest_api/pipeline:/home/user/rest_api/pipeline
ports:
- 8000:8000
restart: on-failure
environment:
# See rest_api/pipeline/pipelines.haystack-pipeline.yml for configurations of Search & Indexing Pipeline.
- DOCUMENTSTORE_PARAMS_HOST=elasticsearch
- PIPELINE_YAML_PATH=/home/user/rest_api/pipeline/pipelines.haystack-pipeline.yml
- CONCURRENT_REQUEST_PER_WORKER
depends_on:
- elasticsearch
# Starts REST API with only 2 workers so that it can be run on systems with just 4GB of memory
# If you need to handle large loads of incoming requests and have memory to spare, consider increasing the number of workers
command: "/bin/bash -c 'sleep 10 && gunicorn rest_api.application:app -b 0.0.0.0 -k uvicorn.workers.UvicornWorker --workers 2 --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 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
dockerfile: Dockerfile
image: "deepset/haystack-streamlit-ui:latest"
ports:
- 8501:8501
restart: on-failure
environment:
- API_ENDPOINT=http://haystack-api:8000
- EVAL_FILE=eval_labels_example.csv
# The value fot the following variables will be read from the host, if present.
# They can also be temporarily set for docker-compose, for example:
# DISABLE_FILE_UPLOAD=1 DEFAULT_DOCS_FROM_RETRIEVER=5 docker-compose up
- DISABLE_FILE_UPLOAD
- DEFAULT_QUESTION_AT_STARTUP
- DEFAULT_DOCS_FROM_RETRIEVER
- DEFAULT_NUMBER_OF_ANSWERS
command: "/bin/bash -c 'sleep 15 && python -m streamlit run ui/webapp.py'"