211 lines
6.6 KiB
YAML
211 lines
6.6 KiB
YAML
# Copyright (C) 2024 Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
services:
|
|
chatqna-redis-vector-db:
|
|
image: redis/redis-stack:7.2.0-v9
|
|
container_name: chatqna-redis-vector-db
|
|
ports:
|
|
- "${CHATQNA_REDIS_VECTOR_PORT}:6379"
|
|
- "${CHATQNA_REDIS_VECTOR_INSIGHT_PORT}:8001"
|
|
|
|
chatqna-dataprep-service:
|
|
image: ${REGISTRY:-opea}/dataprep:${TAG:-latest}
|
|
container_name: chatqna-dataprep-service
|
|
depends_on:
|
|
- chatqna-redis-vector-db
|
|
- chatqna-tei-embedding-service
|
|
ports:
|
|
- "${CHATQNA_REDIS_DATAPREP_PORT:-18103}:5000"
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
http_proxy: ${http_proxy}
|
|
https_proxy: ${https_proxy}
|
|
REDIS_URL: ${CHATQNA_REDIS_URL}
|
|
INDEX_NAME: ${CHATQNA_INDEX_NAME}
|
|
TEI_ENDPOINT: ${CHATQNA_TEI_EMBEDDING_ENDPOINT}
|
|
HUGGINGFACEHUB_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 50
|
|
restart: unless-stopped
|
|
|
|
chatqna-tei-embedding-service:
|
|
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
|
|
container_name: chatqna-tei-embedding-service
|
|
ports:
|
|
- "${CHATQNA_TEI_EMBEDDING_PORT}:80"
|
|
volumes:
|
|
- "${MODEL_CACHE:-./data}:/data"
|
|
shm_size: 1g
|
|
ipc: host
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
http_proxy: ${http_proxy}
|
|
https_proxy: ${https_proxy}
|
|
command: --model-id ${CHATQNA_EMBEDDING_MODEL_ID} --auto-truncate
|
|
|
|
chatqna-retriever:
|
|
image: ${REGISTRY:-opea}/retriever:${TAG:-latest}
|
|
container_name: chatqna-retriever
|
|
depends_on:
|
|
- chatqna-redis-vector-db
|
|
ports:
|
|
- "${CHATQNA_REDIS_RETRIEVER_PORT}:7000"
|
|
ipc: host
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
http_proxy: ${http_proxy}
|
|
https_proxy: ${https_proxy}
|
|
REDIS_URL: ${CHATQNA_REDIS_URL}
|
|
INDEX_NAME: ${CHATQNA_INDEX_NAME}
|
|
TEI_EMBEDDING_ENDPOINT: ${CHATQNA_TEI_EMBEDDING_ENDPOINT}
|
|
HUGGINGFACEHUB_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
|
|
LOGFLAG: ${LOGFLAG}
|
|
RETRIEVER_COMPONENT_NAME: "OPEA_RETRIEVER_REDIS"
|
|
restart: unless-stopped
|
|
|
|
chatqna-tei-reranking-service:
|
|
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
|
|
container_name: chatqna-tei-reranking-service
|
|
ports:
|
|
- "${CHATQNA_TEI_RERANKING_PORT}:80"
|
|
volumes:
|
|
- "${MODEL_CACHE:-./data}:/data"
|
|
shm_size: 1g
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
http_proxy: ${http_proxy}
|
|
https_proxy: ${https_proxy}
|
|
HF_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
|
|
HF_HUB_DISABLE_PROGRESS_BARS: 1
|
|
HF_HUB_ENABLE_HF_TRANSFER: 0
|
|
command: --model-id ${CHATQNA_RERANK_MODEL_ID} --auto-truncate
|
|
|
|
chatqna-tgi-service:
|
|
image: ghcr.io/huggingface/text-generation-inference:2.3.1-rocm
|
|
container_name: chatqna-tgi-service
|
|
ports:
|
|
- "${CHATQNA_TGI_SERVICE_PORT}:80"
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
http_proxy: ${http_proxy}
|
|
https_proxy: ${https_proxy}
|
|
HUGGING_FACE_HUB_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
|
|
HF_HUB_DISABLE_PROGRESS_BARS: 1
|
|
HF_HUB_ENABLE_HF_TRANSFER: 0
|
|
volumes:
|
|
- "${MODEL_CACHE:-./data}:/data"
|
|
shm_size: 1g
|
|
devices:
|
|
- /dev/kfd:/dev/kfd
|
|
- /dev/dri:/dev/dri
|
|
cap_add:
|
|
- SYS_PTRACE
|
|
group_add:
|
|
- video
|
|
security_opt:
|
|
- seccomp:unconfined
|
|
command: --model-id ${CHATQNA_LLM_MODEL_ID}
|
|
ipc: host
|
|
|
|
chatqna-llm-faqgen:
|
|
image: ${REGISTRY:-opea}/llm-faqgen:${TAG:-latest}
|
|
container_name: chatqna-llm-faqgen
|
|
depends_on:
|
|
- chatqna-tgi-service
|
|
ports:
|
|
- ${CHATQNA_LLM_FAQGEN_PORT:-9000}:9000
|
|
ipc: host
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
http_proxy: ${http_proxy}
|
|
https_proxy: ${https_proxy}
|
|
LLM_ENDPOINT: ${CHATQNA_LLM_ENDPOINT}
|
|
LLM_MODEL_ID: ${CHATQNA_LLM_MODEL_ID}
|
|
HF_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
|
|
FAQGen_COMPONENT_NAME: ${FAQGen_COMPONENT_NAME:-OpeaFaqGenTgi}
|
|
LOGFLAG: ${LOGFLAG:-False}
|
|
restart: unless-stopped
|
|
|
|
chatqna-backend-server:
|
|
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
|
|
container_name: chatqna-backend-server
|
|
depends_on:
|
|
chatqna-redis-vector-db:
|
|
condition: service_started
|
|
chatqna-tei-embedding-service:
|
|
condition: service_started
|
|
chatqna-retriever:
|
|
condition: service_started
|
|
chatqna-tei-reranking-service:
|
|
condition: service_started
|
|
chatqna-tgi-service:
|
|
condition: service_started
|
|
chatqna-llm-faqgen:
|
|
condition: service_started
|
|
chatqna-dataprep-service:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${CHATQNA_BACKEND_SERVICE_PORT}:8888"
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
https_proxy: ${https_proxy}
|
|
http_proxy: ${http_proxy}
|
|
MEGA_SERVICE_HOST_IP: ${CHATQNA_MEGA_SERVICE_HOST_IP}
|
|
EMBEDDING_SERVER_HOST_IP: ${HOST_IP}
|
|
EMBEDDING_SERVER_PORT: ${CHATQNA_TEI_EMBEDDING_PORT:-80}
|
|
RETRIEVER_SERVICE_HOST_IP: ${HOST_IP}
|
|
RERANK_SERVER_HOST_IP: ${HOST_IP}
|
|
RERANK_SERVER_PORT: ${CHATQNA_TEI_RERANKING_PORT:-80}
|
|
LLM_SERVER_HOST_IP: ${HOST_IP}
|
|
LLM_SERVER_PORT: ${CHATQNA_LLM_FAQGEN_PORT:-9000}
|
|
LLM_MODEL: ${CHATQNA_LLM_MODEL_ID}
|
|
CHATQNA_TYPE: ${CHATQNA_TYPE:-CHATQNA_FAQGEN}
|
|
ipc: host
|
|
restart: always
|
|
|
|
chatqna-ui-server:
|
|
image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
|
|
container_name: chatqna-ui-server
|
|
depends_on:
|
|
- chatqna-backend-server
|
|
ports:
|
|
- "${CHATQNA_FRONTEND_SERVICE_PORT}:5173"
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
https_proxy: ${https_proxy}
|
|
http_proxy: ${http_proxy}
|
|
CHAT_BASE_URL: ${CHATQNA_BACKEND_SERVICE_ENDPOINT}
|
|
UPLOAD_FILE_BASE_URL: ${CHATQNA_DATAPREP_SERVICE_ENDPOINT}
|
|
GET_FILE: ${CHATQNA_DATAPREP_GET_FILE_ENDPOINT}
|
|
DELETE_FILE: ${CHATQNA_DATAPREP_DELETE_FILE_ENDPOINT}
|
|
ipc: host
|
|
restart: always
|
|
|
|
chatqna-nginx-server:
|
|
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
|
|
container_name: chatqna-nginx-server
|
|
depends_on:
|
|
- chatqna-backend-server
|
|
- chatqna-ui-server
|
|
ports:
|
|
- "${CHATQNA_NGINX_PORT}:80"
|
|
environment:
|
|
no_proxy: ${no_proxy}
|
|
https_proxy: ${https_proxy}
|
|
http_proxy: ${http_proxy}
|
|
FRONTEND_SERVICE_IP: ${CHATQNA_FRONTEND_SERVICE_IP}
|
|
FRONTEND_SERVICE_PORT: ${CHATQNA_FRONTEND_SERVICE_PORT}
|
|
BACKEND_SERVICE_NAME: ${CHATQNA_BACKEND_SERVICE_NAME}
|
|
BACKEND_SERVICE_IP: ${CHATQNA_BACKEND_SERVICE_IP}
|
|
BACKEND_SERVICE_PORT: ${CHATQNA_BACKEND_SERVICE_PORT}
|
|
ipc: host
|
|
restart: always
|
|
|
|
networks:
|
|
default:
|
|
driver: bridge
|