Skip to content

Commit ae31e4f

Browse files
authored
Enable health check for dataprep in ChatQnA (#1799)
Signed-off-by: letonghan <letong.han@intel.com>
1 parent 4fc19c7 commit ae31e4f

20 files changed

+369
-113
lines changed

ChatQnA/docker_compose/amd/gpu/rocm/compose.yaml

+18-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${CHATQNA_INDEX_NAME}
2626
TEI_ENDPOINT: ${CHATQNA_TEI_EMBEDDING_ENDPOINT}
2727
HUGGINGFACEHUB_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834

2935
chatqna-tei-embedding-service:
3036
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
@@ -109,11 +115,18 @@ services:
109115
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
110116
container_name: chatqna-backend-server
111117
depends_on:
112-
- chatqna-redis-vector-db
113-
- chatqna-tei-embedding-service
114-
- chatqna-retriever
115-
- chatqna-tei-reranking-service
116-
- chatqna-tgi-service
118+
chatqna-redis-vector-db:
119+
condition: service_started
120+
chatqna-tei-embedding-service:
121+
condition: service_started
122+
chatqna-retriever:
123+
condition: service_started
124+
chatqna-tei-reranking-service:
125+
condition: service_started
126+
chatqna-tgi-service:
127+
condition: service_started
128+
chatqna-dataprep-service:
129+
condition: service_healthy
117130
ports:
118131
- "${CHATQNA_BACKEND_SERVICE_PORT:-8888}:8888"
119132
environment:

ChatQnA/docker_compose/amd/gpu/rocm/compose_faqgen.yaml

+20-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${CHATQNA_INDEX_NAME}
2626
TEI_ENDPOINT: ${CHATQNA_TEI_EMBEDDING_ENDPOINT}
2727
HUGGINGFACEHUB_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834

2935
chatqna-tei-embedding-service:
3036
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
@@ -128,12 +134,20 @@ services:
128134
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
129135
container_name: chatqna-backend-server
130136
depends_on:
131-
- chatqna-redis-vector-db
132-
- chatqna-tei-embedding-service
133-
- chatqna-retriever
134-
- chatqna-tei-reranking-service
135-
- chatqna-tgi-service
136-
- chatqna-llm-faqgen
137+
chatqna-redis-vector-db:
138+
condition: service_started
139+
chatqna-tei-embedding-service:
140+
condition: service_started
141+
chatqna-retriever:
142+
condition: service_started
143+
chatqna-tei-reranking-service:
144+
condition: service_started
145+
chatqna-tgi-service:
146+
condition: service_started
147+
chatqna-llm-faqgen:
148+
condition: service_started
149+
chatqna-dataprep-service:
150+
condition: service_healthy
137151
ports:
138152
- "${CHATQNA_BACKEND_SERVICE_PORT}:8888"
139153
environment:

ChatQnA/docker_compose/amd/gpu/rocm/compose_faqgen_vllm.yaml

+20-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${CHATQNA_INDEX_NAME}
2626
TEI_ENDPOINT: ${CHATQNA_TEI_EMBEDDING_ENDPOINT}
2727
HUGGINGFACEHUB_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834

2935
chatqna-tei-embedding-service:
3036
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -133,12 +139,20 @@ services:
133139
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
134140
container_name: chatqna-backend-server
135141
depends_on:
136-
- chatqna-redis-vector-db
137-
- chatqna-tei-embedding-service
138-
- chatqna-retriever
139-
- chatqna-tei-reranking-service
140-
- chatqna-vllm-service
141-
- chatqna-llm-faqgen
142+
chatqna-redis-vector-db:
143+
condition: service_started
144+
chatqna-tei-embedding-service:
145+
condition: service_started
146+
chatqna-retriever:
147+
condition: service_started
148+
chatqna-tei-reranking-service:
149+
condition: service_started
150+
chatqna-vllm-service:
151+
condition: service_started
152+
chatqna-llm-faqgen:
153+
condition: service_started
154+
chatqna-dataprep-redis-service:
155+
condition: service_healthy
142156
ports:
143157
- "${CHATQNA_BACKEND_SERVICE_PORT}:8888"
144158
environment:

ChatQnA/docker_compose/amd/gpu/rocm/compose_vllm.yaml

+18-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${CHATQNA_INDEX_NAME}
2626
TEI_ENDPOINT: ${CHATQNA_TEI_EMBEDDING_ENDPOINT}
2727
HUGGINGFACEHUB_API_TOKEN: ${CHATQNA_HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834

2935
chatqna-tei-embedding-service:
3036
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -111,11 +117,18 @@ services:
111117
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
112118
container_name: chatqna-backend-server
113119
depends_on:
114-
- chatqna-redis-vector-db
115-
- chatqna-tei-embedding-service
116-
- chatqna-retriever
117-
- chatqna-tei-reranking-service
118-
- chatqna-vllm-service
120+
chatqna-redis-vector-db:
121+
condition: service_started
122+
chatqna-tei-embedding-service:
123+
condition: service_started
124+
chatqna-retriever:
125+
condition: service_started
126+
chatqna-tei-reranking-service:
127+
condition: service_started
128+
chatqna-vllm-service:
129+
condition: service_started
130+
chatqna-dataprep-service:
131+
condition: service_healthy
119132
ports:
120133
- "${CHATQNA_BACKEND_SERVICE_PORT}:8888"
121134
environment:

ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml

+16-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${INDEX_NAME}
2626
TEI_ENDPOINT: http://tei-embedding-service:80
2727
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834
tei-embedding-service:
2935
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
3036
container_name: tei-embedding-server
@@ -92,11 +98,16 @@ services:
9298
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
9399
container_name: chatqna-aipc-backend-server
94100
depends_on:
95-
- redis-vector-db
96-
- dataprep-redis-service
97-
- tei-embedding-service
98-
- retriever
99-
- tei-reranking-service
101+
redis-vector-db:
102+
condition: service_started
103+
dataprep-redis-service:
104+
condition: service_healthy
105+
tei-embedding-service:
106+
condition: service_started
107+
retriever:
108+
condition: service_started
109+
tei-reranking-service:
110+
condition: service_started
100111
ports:
101112
- "8888:8888"
102113
environment:

ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml

+18-5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ services:
3232
INDEX_NAME: ${INDEX_NAME}
3333
TEI_ENDPOINT: http://tei-embedding-service:80
3434
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
35+
healthcheck:
36+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
37+
interval: 10s
38+
timeout: 5s
39+
retries: 50
40+
restart: unless-stopped
3541
tei-embedding-service:
3642
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
3743
container_name: tei-embedding-server
@@ -107,11 +113,18 @@ services:
107113
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
108114
container_name: chatqna-xeon-backend-server
109115
depends_on:
110-
- redis-vector-db
111-
- tei-embedding-service
112-
- retriever
113-
- tei-reranking-service
114-
- vllm-service
116+
redis-vector-db:
117+
condition: service_started
118+
dataprep-redis-service:
119+
condition: service_healthy
120+
tei-embedding-service:
121+
condition: service_started
122+
retriever:
123+
condition: service_started
124+
tei-reranking-service:
125+
condition: service_started
126+
vllm-service:
127+
condition: service_healthy
115128
ports:
116129
- "8888:8888"
117130
environment:

ChatQnA/docker_compose/intel/cpu/xeon/compose_faqgen.yaml

+20-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${INDEX_NAME}
2626
TEI_ENDPOINT: http://tei-embedding-service:80
2727
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834
tei-embedding-service:
2935
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
3036
container_name: tei-embedding-server
@@ -121,12 +127,20 @@ services:
121127
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
122128
container_name: chatqna-xeon-backend-server
123129
depends_on:
124-
- redis-vector-db
125-
- tei-embedding-service
126-
- retriever
127-
- tei-reranking-service
128-
- vllm-service
129-
- llm-faqgen
130+
redis-vector-db:
131+
condition: service_started
132+
tei-embedding-service:
133+
condition: service_started
134+
retriever:
135+
condition: service_started
136+
tei-reranking-service:
137+
condition: service_started
138+
vllm-service:
139+
condition: service_started
140+
llm-faqgen:
141+
condition: service_started
142+
dataprep-redis-service:
143+
condition: service_healthy
130144
ports:
131145
- ${CHATQNA_BACKEND_PORT:-8888}:8888
132146
environment:

ChatQnA/docker_compose/intel/cpu/xeon/compose_faqgen_tgi.yaml

+20-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
INDEX_NAME: ${INDEX_NAME}
2626
TEI_ENDPOINT: http://tei-embedding-service:80
2727
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
28+
healthcheck:
29+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 50
33+
restart: unless-stopped
2834
tei-embedding-service:
2935
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
3036
container_name: tei-embedding-server
@@ -121,12 +127,20 @@ services:
121127
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
122128
container_name: chatqna-xeon-backend-server
123129
depends_on:
124-
- redis-vector-db
125-
- tei-embedding-service
126-
- retriever
127-
- tei-reranking-service
128-
- tgi-service
129-
- llm-faqgen
130+
redis-vector-db:
131+
condition: service_started
132+
tei-embedding-service:
133+
condition: service_started
134+
retriever:
135+
condition: service_started
136+
tei-reranking-service:
137+
condition: service_started
138+
tgi-service:
139+
condition: service_started
140+
llm-faqgen:
141+
condition: service_started
142+
dataprep-redis-service:
143+
condition: service_healthy
130144
ports:
131145
- ${CHATQNA_BACKEND_PORT:-8888}:8888
132146
environment:

ChatQnA/docker_compose/intel/cpu/xeon/compose_milvus.yaml

+16-7
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ services:
7878
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
7979
EMBEDDING_MODEL_ID: ${EMBEDDING_MODEL_ID}
8080
LOGFLAG: ${LOGFLAG}
81+
healthcheck:
82+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
83+
interval: 10s
84+
timeout: 5s
85+
retries: 50
8186
restart: unless-stopped
8287
depends_on:
8388
milvus-standalone:
@@ -154,7 +159,7 @@ services:
154159
LLM_MODEL_ID: ${LLM_MODEL_ID}
155160
VLLM_TORCH_PROFILER_DIR: "/mnt"
156161
healthcheck:
157-
test: ["CMD-SHELL", "curl -f http://$host_ip:9009/health || exit 1"]
162+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
158163
interval: 10s
159164
timeout: 10s
160165
retries: 100
@@ -164,12 +169,16 @@ services:
164169
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
165170
container_name: chatqna-xeon-backend-server
166171
depends_on:
167-
- milvus-standalone
168-
- tei-embedding-service
169-
- dataprep-milvus-service
170-
- retriever
171-
- tei-reranking-service
172-
- vllm-service
172+
tei-embedding-service:
173+
condition: service_started
174+
dataprep-milvus-service:
175+
condition: service_healthy
176+
retriever:
177+
condition: service_started
178+
tei-reranking-service:
179+
condition: service_started
180+
vllm-service:
181+
condition: service_healthy
173182
ports:
174183
- "8888:8888"
175184
environment:

ChatQnA/docker_compose/intel/cpu/xeon/compose_pinecone.yaml

+16-5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ services:
2222
LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
2323
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
2424
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_PINECONE"
25+
healthcheck:
26+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
27+
interval: 10s
28+
timeout: 5s
29+
retries: 50
30+
restart: unless-stopped
2531
tei-embedding-service:
2632
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
2733
container_name: tei-embedding-server
@@ -89,11 +95,16 @@ services:
8995
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
9096
container_name: chatqna-xeon-backend-server
9197
depends_on:
92-
- tei-embedding-service
93-
- dataprep-pinecone-service
94-
- retriever
95-
- tei-reranking-service
96-
- vllm-service
98+
tei-embedding-service:
99+
condition: service_started
100+
dataprep-pinecone-service:
101+
condition: service_healthy
102+
retriever:
103+
condition: service_started
104+
tei-reranking-service:
105+
condition: service_started
106+
vllm-service:
107+
condition: service_started
97108
ports:
98109
- "8888:8888"
99110
environment:

0 commit comments

Comments
 (0)