Skip to content

Commit 136903b

Browse files
ezelanzaEzequiel Lanzakendall1997chensuyueSpycsh
authored and
Chingis Yundunov
committed
ChatQnA Docker compose file for Milvus as vdb (opea-project#1548)
Signed-off-by: Ezequiel Lanza <ezequiel.lanza@gmail.com> Signed-off-by: Kendall González León <kendall.gonzalez.leon@intel.com> Signed-off-by: chensuyue <suyue.chen@intel.com> Signed-off-by: Spycsh <sihan.chen@intel.com> Signed-off-by: Wang, Xigui <xigui.wang@intel.com> Signed-off-by: ZePan110 <ze.pan@intel.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: minmin-intel <minmin.hou@intel.com> Signed-off-by: Artem Astafev <a.astafev@datamonsters.com> Signed-off-by: Xinyao Wang <xinyao.wang@intel.com> Signed-off-by: Cathy Zhang <cathy.zhang@intel.com> Signed-off-by: letonghan <letong.han@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com> Signed-off-by: WenjiaoYue <wenjiao.yue@intel.com> Co-authored-by: Ezequiel Lanza <emlanza@CDQ242RKJDmac.local> Co-authored-by: Kendall González León <kendallgonzalez@hotmail.es> Co-authored-by: chen, suyue <suyue.chen@intel.com> Co-authored-by: Spycsh <39623753+Spycsh@users.noreply.github.com> Co-authored-by: xiguiw <111278656+xiguiw@users.noreply.github.com> Co-authored-by: jotpalch <49465120+jotpalch@users.noreply.github.com> Co-authored-by: ZePan110 <ze.pan@intel.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: minmin-intel <minmin.hou@intel.com> Co-authored-by: Ying Hu <ying.hu@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com> Co-authored-by: Liang Lv <liang1.lv@intel.com> Co-authored-by: Artem Astafev <a.astafev@datamonsters.com> Co-authored-by: XinyaoWa <xinyao.wang@intel.com> Co-authored-by: alexsin368 <109180236+alexsin368@users.noreply.github.com> Co-authored-by: WenjiaoYue <wenjiao.yue@intel.com> Signed-off-by: Chingis Yundunov <YundunovCN@sibedge.com>
1 parent 1f42b35 commit 136903b

File tree

3 files changed

+1287
-0
lines changed

3 files changed

+1287
-0
lines changed
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
# Copyright (C) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
services:
4+
etcd:
5+
container_name: milvus-etcd
6+
image: quay.io/coreos/etcd:v3.5.5
7+
environment:
8+
- ETCD_AUTO_COMPACTION_MODE=revision
9+
- ETCD_AUTO_COMPACTION_RETENTION=1000
10+
- ETCD_QUOTA_BACKEND_BYTES=4294967296
11+
- ETCD_SNAPSHOT_COUNT=50000
12+
volumes:
13+
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd
14+
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
15+
healthcheck:
16+
test: ["CMD", "etcdctl", "endpoint", "health"]
17+
interval: 30s
18+
timeout: 20s
19+
retries: 3
20+
21+
minio:
22+
container_name: milvus-minio
23+
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
24+
environment:
25+
MINIO_ACCESS_KEY: minioadmin
26+
MINIO_SECRET_KEY: minioadmin
27+
ports:
28+
- "${MINIO_PORT1:-5044}:9001"
29+
- "${MINIO_PORT2:-5043}:9000"
30+
volumes:
31+
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
32+
command: minio server /minio_data --console-address ":9001"
33+
healthcheck:
34+
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
35+
interval: 30s
36+
timeout: 20s
37+
retries: 3
38+
39+
milvus-standalone:
40+
container_name: milvus-standalone
41+
image: milvusdb/milvus:v2.4.6
42+
command: ["milvus", "run", "standalone"]
43+
security_opt:
44+
- seccomp:unconfined
45+
environment:
46+
ETCD_ENDPOINTS: etcd:2379
47+
MINIO_ADDRESS: minio:9000
48+
volumes:
49+
- ${DOCKER_VOLUME_DIRECTORY:-.}/milvus.yaml:/milvus/configs/milvus.yaml
50+
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
51+
healthcheck:
52+
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
53+
interval: 30s
54+
start_period: 90s
55+
timeout: 20s
56+
retries: 3
57+
ports:
58+
- "19530:19530"
59+
- "${MILVUS_STANDALONE_PORT:-9091}:9091"
60+
depends_on:
61+
- "etcd"
62+
- "minio"
63+
64+
dataprep-milvus-service:
65+
image: ${REGISTRY:-opea}/dataprep:${TAG:-latest}
66+
container_name: dataprep-milvus-server
67+
ports:
68+
- "${DATAPREP_PORT:-11101}:5000"
69+
ipc: host
70+
environment:
71+
no_proxy: ${no_proxy}
72+
http_proxy: ${http_proxy}
73+
https_proxy: ${https_proxy}
74+
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_MILVUS"
75+
MILVUS_HOST: ${host_ip}
76+
MILVUS_PORT: 19530
77+
TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80
78+
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
79+
EMBEDDING_MODEL_ID: ${EMBEDDING_MODEL_ID}
80+
LOGFLAG: ${LOGFLAG}
81+
restart: unless-stopped
82+
depends_on:
83+
milvus-standalone:
84+
condition: service_healthy
85+
etcd:
86+
condition: service_healthy
87+
minio:
88+
condition: service_healthy
89+
90+
retriever:
91+
image: ${REGISTRY:-opea}/retriever:${TAG:-latest}
92+
container_name: retriever-milvus-server
93+
depends_on:
94+
- milvus-standalone
95+
ports:
96+
- "7000:7000"
97+
ipc: host
98+
environment:
99+
no_proxy: ${no_proxy}
100+
http_proxy: ${http_proxy}
101+
https_proxy: ${https_proxy}
102+
MILVUS_HOST: ${host_ip}
103+
MILVUS_PORT: 19530
104+
TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80
105+
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
106+
LOGFLAG: ${LOGFLAG}
107+
RETRIEVER_COMPONENT_NAME: "OPEA_RETRIEVER_MILVUS"
108+
restart: unless-stopped
109+
110+
tei-embedding-service:
111+
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
112+
container_name: tei-embedding-server
113+
ports:
114+
- "6006:80"
115+
volumes:
116+
- "./data:/data"
117+
shm_size: 1g
118+
environment:
119+
no_proxy: ${no_proxy}
120+
http_proxy: ${http_proxy}
121+
https_proxy: ${https_proxy}
122+
command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
123+
124+
tei-reranking-service:
125+
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
126+
container_name: tei-reranking-server
127+
ports:
128+
- "8808:80"
129+
volumes:
130+
- "./data:/data"
131+
shm_size: 1g
132+
environment:
133+
no_proxy: ${no_proxy}
134+
http_proxy: ${http_proxy}
135+
https_proxy: ${https_proxy}
136+
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
137+
HF_HUB_DISABLE_PROGRESS_BARS: 1
138+
HF_HUB_ENABLE_HF_TRANSFER: 0
139+
command: --model-id ${RERANK_MODEL_ID} --auto-truncate
140+
141+
vllm-service:
142+
image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
143+
container_name: vllm-service
144+
ports:
145+
- "9009:80"
146+
volumes:
147+
- "./data:/data"
148+
shm_size: 128g
149+
environment:
150+
no_proxy: ${no_proxy}
151+
http_proxy: ${http_proxy}
152+
https_proxy: ${https_proxy}
153+
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
154+
LLM_MODEL_ID: ${LLM_MODEL_ID}
155+
VLLM_TORCH_PROFILER_DIR: "/mnt"
156+
healthcheck:
157+
test: ["CMD-SHELL", "curl -f http://$host_ip:9009/health || exit 1"]
158+
interval: 10s
159+
timeout: 10s
160+
retries: 100
161+
command: --model $LLM_MODEL_ID --host 0.0.0.0 --port 80
162+
163+
chatqna-xeon-backend-server:
164+
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
165+
container_name: chatqna-xeon-backend-server
166+
depends_on:
167+
- milvus-standalone
168+
- tei-embedding-service
169+
- dataprep-milvus-service
170+
- retriever
171+
- tei-reranking-service
172+
- vllm-service
173+
ports:
174+
- "8888:8888"
175+
environment:
176+
- no_proxy=${no_proxy}
177+
- https_proxy=${https_proxy}
178+
- http_proxy=${http_proxy}
179+
- MEGA_SERVICE_HOST_IP=chatqna-xeon-backend-server
180+
- EMBEDDING_SERVER_HOST_IP=tei-embedding-service
181+
- RETRIEVER_SERVICE_HOST_IP=retriever
182+
- EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80}
183+
- RERANK_SERVER_HOST_IP=tei-reranking-service
184+
- RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80}
185+
- LLM_SERVER_HOST_IP=vllm-service
186+
- LLM_SERVER_PORT=${LLM_SERVER_PORT:-80}
187+
- LLM_MODEL=${LLM_MODEL_ID}
188+
- LOGFLAG=${LOGFLAG}
189+
ipc: host
190+
restart: always
191+
192+
chatqna-xeon-ui-server:
193+
image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
194+
container_name: chatqna-xeon-ui-server
195+
depends_on:
196+
- chatqna-xeon-backend-server
197+
ports:
198+
- "5173:5173"
199+
ipc: host
200+
restart: always
201+
202+
chatqna-xeon-nginx-server:
203+
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
204+
container_name: chatqna-xeon-nginx-server
205+
depends_on:
206+
- chatqna-xeon-backend-server
207+
- chatqna-xeon-ui-server
208+
ports:
209+
- "${NGINX_PORT:-80}:80"
210+
environment:
211+
- no_proxy=${no_proxy}
212+
- https_proxy=${https_proxy}
213+
- http_proxy=${http_proxy}
214+
- FRONTEND_SERVICE_IP=chatqna-xeon-ui-server
215+
- FRONTEND_SERVICE_PORT=5173
216+
- BACKEND_SERVICE_NAME=chatqna
217+
- BACKEND_SERVICE_IP=chatqna-xeon-backend-server
218+
- BACKEND_SERVICE_PORT=8888
219+
- DATAPREP_SERVICE_IP=dataprep-milvus-service
220+
- DATAPREP_SERVICE_PORT=5000
221+
ipc: host
222+
restart: always
223+
224+
225+
networks:
226+
default:
227+
driver: bridge

0 commit comments

Comments
 (0)