Skip to content

Commit 434beeb

Browse files
authored
feat: Change docker-compose.yml file (#3673)
* feat: Change `docker-compose.yml` file * Add `volumes` to read from the local `/pipelines` folder * Change the `PIPELINE_YAML_PATH` value and refer to the local `pipelines.haystack-pipeline.yml` * Change the elasticsearch image * Fix volume * Update readme to direct users to the new demos repository
1 parent b155297 commit 434beeb

File tree

2 files changed

+5
-83
lines changed

2 files changed

+5
-83
lines changed

README.md

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -154,63 +154,7 @@ Ask any question on countries or capital cities and let Haystack return the answ
154154

155155
**Local**
156156

157-
Start up a Haystack service via [Docker Compose](https://docs.docker.com/compose/).
158-
With this you can begin calling it directly via the REST API or even interact with it using the included Streamlit UI.
159-
160-
<details>
161-
<summary>Click here for a step-by-step guide</summary>
162-
163-
**1. Update/install Docker and Docker Compose, then launch Docker**
164-
165-
```
166-
apt-get update && apt-get install docker && apt-get install docker-compose
167-
service docker start
168-
```
169-
170-
**2. Clone Haystack repository**
171-
172-
```
173-
git clone https://github.com/deepset-ai/haystack.git
174-
```
175-
176-
**3. Pull images & launch demo app**
177-
178-
```
179-
cd haystack
180-
docker-compose pull
181-
docker-compose up
182-
183-
# Or on a GPU machine: docker-compose -f docker-compose-gpu.yml up
184-
```
185-
186-
You should be able to see the following in your terminal window as part of the log output:
187-
188-
```
189-
..
190-
ui_1 | You can now view your Streamlit app in your browser.
191-
..
192-
ui_1 | External URL: http://192.168.108.218:8501
193-
..
194-
haystack-api_1 | [2021-01-01 10:21:58 +0000] [17] [INFO] Application startup complete.
195-
```
196-
197-
**4. Open the Streamlit UI for Haystack by pointing your browser to the "External URL" from above.**
198-
199-
You should see the following:
200-
201-
![image](https://raw.githubusercontent.com/deepset-ai/haystack/main/docs/img/streamlit_ui_screenshot.png)
202-
203-
You can then try different queries against a pre-defined set of indexed articles related to Game of Thrones.
204-
205-
**Note**: The following containers are started as a part of this demo:
206-
207-
* Haystack API: listens on port 8000
208-
* DocumentStore (Elasticsearch): listens on port 9200
209-
* Streamlit UI: listens on port 8501
210-
211-
Please note that the demo will [publish](https://docs.docker.com/config/containers/container-networking/) the container ports to the outside world. *We suggest that you review the firewall settings depending on your system setup and the security guidelines.*
212-
213-
</details>
157+
To run the Explore The World demo on your own machine and customize it to your needs, check out the instructions on [Explore the World repository](https://github.com/deepset-ai/haystack-demos/tree/main/explore_the_world) on GitHub.
214158

215159
## :vulcan_salute: Community
216160

docker-compose.yml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,21 @@ services:
33
haystack-api:
44
# Pull Haystack's latest commit
55
image: "deepset/haystack:cpu-main"
6+
volumes:
7+
- ./rest_api/rest_api/pipeline:/opt/pipelines
68
ports:
79
- 8000:8000
810
restart: on-failure
911
environment:
10-
# See rest_api/pipeline/pipelines.haystack-pipeline.yml for configurations of Search & Indexing Pipeline.
1112
- DOCUMENTSTORE_PARAMS_HOST=elasticsearch
12-
- PIPELINE_YAML_PATH=/opt/venv/lib/python3.10/site-packages/rest_api/pipeline/pipelines.haystack-pipeline.yml
13-
- QUERY_PIPELINE_NAME=query
13+
- PIPELINE_YAML_PATH=/opt/pipelines/pipelines.haystack-pipeline.yml
1414
- TOKENIZERS_PARALLELISM=false
1515
depends_on:
1616
elasticsearch:
1717
condition: service_healthy
1818

1919
elasticsearch:
20-
# This image is "ready-to-query" with some indexed articles
21-
# about countries and capital cities from Wikipedia:
22-
image: "deepset/elasticsearch-countries-and-capitals"
20+
image: "docker.elastic.co/elasticsearch/elasticsearch:7.17.6"
2321
ports:
2422
- 9200:9200
2523
restart: on-failure
@@ -31,23 +29,3 @@ services:
3129
interval: 10s
3230
timeout: 1s
3331
retries: 10
34-
35-
ui:
36-
depends_on:
37-
- haystack-api
38-
build:
39-
context: ui
40-
dockerfile: Dockerfile
41-
ports:
42-
- 8501:8501
43-
restart: on-failure
44-
environment:
45-
- API_ENDPOINT=http://haystack-api:8000
46-
- EVAL_FILE=ui/eval_labels_example.csv
47-
# The value of the following variables will be read from the host, if present.
48-
# They can also be temporarily set for docker-compose, for example:
49-
# DISABLE_FILE_UPLOAD=1 DEFAULT_DOCS_FROM_RETRIEVER=5 docker-compose up
50-
- DISABLE_FILE_UPLOAD
51-
- DEFAULT_QUESTION_AT_STARTUP
52-
- DEFAULT_DOCS_FROM_RETRIEVER
53-
- DEFAULT_NUMBER_OF_ANSWERS

0 commit comments

Comments
 (0)