mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-25 18:00:28 +00:00

* remove duplicate imports * fix ungrouped-imports * Fix wrong-import-position * Fix unused-import * pyproject.toml * Working on wrong-import-order * Solve wrong-import-order * fix Pool import * Move open_search_index_to_document_store and elasticsearch_index_to_document_store in elasticsearch.py * remove Converter from modeling * Fix mypy issues on adaptive_model.py * create es_converter.py * remove converter import * change import path in tests * Restructure REST API to not rely on global vars from search.apy and improve tests * Fix openapi generator * Move variable initialization * Change type of FilterRequest.filters Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
63 lines
2.3 KiB
YAML
63 lines
2.3 KiB
YAML
version: "3"
|
|
services:
|
|
|
|
haystack-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile-GPU
|
|
image: "deepset/haystack-gpu:latest"
|
|
# in recent docker-compose version you can enable GPU resources. Make sure to fulfill the prerequisites listed here: https://docs.docker.com/compose/gpu-support/
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
# # 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_dpr.haystack-pipeline.yml
|
|
- CONCURRENT_REQUEST_PER_WORKER
|
|
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 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'"
|