Skip to content

Commit 7c6189c

Browse files
letonghanCopilot
andauthored
Enable dataprep health check for examples (#1800)
Signed-off-by: letonghan <letong.han@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ae31e4f commit 7c6189c

File tree

12 files changed

+201
-73
lines changed

12 files changed

+201
-73
lines changed

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

+12-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
2121
host_ip: ${host_ip}
2222
healthcheck:
23-
test: ["CMD-SHELL", "curl -f http://$host_ip:8028/health || exit 1"]
23+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
2424
interval: 10s
2525
timeout: 10s
2626
retries: 100
@@ -42,7 +42,7 @@ services:
4242
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
4343
host_ip: ${host_ip}
4444
healthcheck:
45-
test: ["CMD-SHELL", "curl -f http://$host_ip:8028/health || exit 1"]
45+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
4646
interval: 10s
4747
timeout: 10s
4848
retries: 100
@@ -84,7 +84,10 @@ services:
8484
image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
8585
container_name: codegen-xeon-backend-server
8686
depends_on:
87-
- llm-base
87+
llm-base:
88+
condition: service_started
89+
dataprep-redis-server:
90+
condition: service_healthy
8891
ports:
8992
- "7778:7778"
9093
environment:
@@ -139,6 +142,11 @@ services:
139142
INDEX_NAME: ${INDEX_NAME}
140143
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
141144
LOGFLAG: true
145+
healthcheck:
146+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
147+
interval: 10s
148+
timeout: 5s
149+
retries: 10
142150
restart: unless-stopped
143151
tei-embedding-serving:
144152
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -156,7 +164,7 @@ services:
156164
host_ip: ${host_ip}
157165
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
158166
healthcheck:
159-
test: ["CMD", "curl", "-f", "http://${host_ip}:${TEI_EMBEDDER_PORT}/health"]
167+
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
160168
interval: 10s
161169
timeout: 6s
162170
retries: 48

CodeGen/docker_compose/intel/hpu/gaudi/compose.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ services:
2323
USE_FLASH_ATTENTION: true
2424
FLASH_ATTENTION_RECOMPUTE: true
2525
healthcheck:
26-
test: ["CMD-SHELL", "curl -f http://$host_ip:8028/health || exit 1"]
26+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
2727
interval: 10s
2828
timeout: 10s
2929
retries: 100
@@ -53,7 +53,7 @@ services:
5353
NUM_CARDS: ${NUM_CARDS:-1}
5454
VLLM_TORCH_PROFILER_DIR: "/mnt"
5555
healthcheck:
56-
test: ["CMD-SHELL", "curl -f http://$host_ip:8028/health || exit 1"]
56+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
5757
interval: 10s
5858
timeout: 10s
5959
retries: 100
@@ -99,7 +99,10 @@ services:
9999
image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
100100
container_name: codegen-gaudi-backend-server
101101
depends_on:
102-
- llm-base
102+
llm-base:
103+
condition: service_started
104+
dataprep-redis-server:
105+
condition: service_healthy
103106
ports:
104107
- "7778:7778"
105108
environment:
@@ -155,6 +158,11 @@ services:
155158
INDEX_NAME: ${INDEX_NAME}
156159
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
157160
LOGFLAG: true
161+
healthcheck:
162+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
163+
interval: 10s
164+
timeout: 5s
165+
retries: 10
158166
restart: unless-stopped
159167
tei-embedding-serving:
160168
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -172,7 +180,7 @@ services:
172180
host_ip: ${host_ip}
173181
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
174182
healthcheck:
175-
test: ["CMD", "curl", "-f", "http://${host_ip}:${TEI_EMBEDDER_PORT}/health"]
183+
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
176184
interval: 10s
177185
timeout: 6s
178186
retries: 48

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

+20-9
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ services:
2020
condition: service_healthy
2121
ports:
2222
- "6007:5000"
23-
- "6008:6008"
24-
- "6009:6009"
2523
environment:
2624
no_proxy: ${no_proxy}
2725
http_proxy: ${http_proxy}
@@ -32,6 +30,12 @@ services:
3230
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
3331
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
3432
LOGFLAG: ${LOGFLAG}
33+
healthcheck:
34+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
35+
interval: 10s
36+
timeout: 5s
37+
retries: 10
38+
restart: unless-stopped
3539
tei-embedding-service:
3640
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
3741
entrypoint: /bin/sh -c "apt-get update && apt-get install -y curl && text-embeddings-router --json-output --model-id ${EMBEDDING_MODEL_ID} --auto-truncate"
@@ -48,7 +52,7 @@ services:
4852
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
4953
host_ip: ${host_ip}
5054
healthcheck:
51-
test: ["CMD-SHELL", "curl -f http://$host_ip:6006/health || exit 1"]
55+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
5256
interval: 10s
5357
timeout: 10s
5458
retries: 60
@@ -106,7 +110,7 @@ services:
106110
HF_HUB_ENABLE_HF_TRANSFER: 0
107111
host_ip: ${host_ip}
108112
healthcheck:
109-
test: ["CMD-SHELL", "curl -f http://$host_ip:8808/health || exit 1"]
113+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
110114
interval: 10s
111115
timeout: 10s
112116
retries: 60
@@ -134,11 +138,18 @@ services:
134138
image: ${REGISTRY:-opea}/doc-index-retriever:${TAG:-latest}
135139
container_name: doc-index-retriever-server
136140
depends_on:
137-
- redis-vector-db
138-
- tei-embedding-service
139-
- embedding
140-
- retriever
141-
- reranking
141+
redis-vector-db:
142+
condition: service_started
143+
tei-embedding-service:
144+
condition: service_healthy
145+
embedding:
146+
condition: service_started
147+
dataprep-redis-service:
148+
condition: service_healthy
149+
retriever:
150+
condition: service_started
151+
reranking:
152+
condition: service_started
142153
ports:
143154
- "8889:8889"
144155
environment:

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

+19-7
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ services:
7878
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
7979
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
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: 10
8186
restart: unless-stopped
8287
depends_on:
8388
tei-embedding-service:
@@ -105,7 +110,7 @@ services:
105110
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
106111
host_ip: ${host_ip}
107112
healthcheck:
108-
test: ["CMD-SHELL", "curl -f http://$host_ip:6006/health || exit 1"]
113+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
109114
interval: 10s
110115
timeout: 10s
111116
retries: 60
@@ -167,7 +172,7 @@ services:
167172
HF_HUB_ENABLE_HF_TRANSFER: 0
168173
host_ip: ${host_ip}
169174
healthcheck:
170-
test: ["CMD-SHELL", "curl -f http://$host_ip:8808/health || exit 1"]
175+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
171176
interval: 10s
172177
timeout: 10s
173178
retries: 60
@@ -199,11 +204,18 @@ services:
199204
image: ${REGISTRY:-opea}/doc-index-retriever:${TAG:-latest}
200205
container_name: doc-index-retriever-server
201206
depends_on:
202-
- milvus-standalone
203-
- tei-embedding-service
204-
- embedding
205-
- retriever
206-
- reranking
207+
milvus-standalone:
208+
condition: service_healthy
209+
tei-embedding-service:
210+
condition: service_healthy
211+
embedding:
212+
condition: service_started
213+
dataprep-milvus:
214+
condition: service_healthy
215+
retriever:
216+
condition: service_started
217+
reranking:
218+
condition: service_started
207219
ports:
208220
- "8889:8889"
209221
environment:

DocIndexRetriever/docker_compose/intel/cpu/xeon/compose_without_rerank.yaml

+17-7
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ services:
1717
- redis-vector-db
1818
ports:
1919
- "6007:5000"
20-
- "6008:6008"
21-
- "6009:6009"
2220
environment:
2321
no_proxy: ${no_proxy}
2422
http_proxy: ${http_proxy}
@@ -29,6 +27,12 @@ services:
2927
TEI_ENDPOINT: http://tei-embedding-service:80
3028
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
3129
LOGFLAG: ${LOGFLAG}
30+
healthcheck:
31+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
32+
interval: 10s
33+
timeout: 5s
34+
retries: 10
35+
restart: unless-stopped
3236
tei-embedding-service:
3337
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
3438
entrypoint: /bin/sh -c "apt-get update && apt-get install -y curl && text-embeddings-router --json-output --model-id ${EMBEDDING_MODEL_ID} --auto-truncate"
@@ -45,7 +49,7 @@ services:
4549
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
4650
host_ip: ${host_ip}
4751
healthcheck:
48-
test: ["CMD-SHELL", "curl -f http://$host_ip:6006/health || exit 1"]
52+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
4953
interval: 10s
5054
timeout: 10s
5155
retries: 60
@@ -89,10 +93,16 @@ services:
8993
image: ${REGISTRY:-opea}/doc-index-retriever:${TAG:-latest}
9094
container_name: doc-index-retriever-server
9195
depends_on:
92-
- redis-vector-db
93-
- tei-embedding-service
94-
- embedding
95-
- retriever
96+
redis-vector-db:
97+
condition: service_started
98+
tei-embedding-service:
99+
condition: service_healthy
100+
embedding:
101+
condition: service_started
102+
dataprep-redis-service:
103+
condition: service_healthy
104+
retriever:
105+
condition: service_started
96106
ports:
97107
- "8889:8889"
98108
environment:

DocIndexRetriever/docker_compose/intel/hpu/gaudi/compose.yaml

+20-7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ services:
2929
INDEX_NAME: ${INDEX_NAME}
3030
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
3131
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
32+
healthcheck:
33+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
34+
interval: 10s
35+
timeout: 5s
36+
retries: 10
37+
restart: unless-stopped
3238
tei-embedding-service:
3339
image: ghcr.io/huggingface/tei-gaudi:1.5.0
3440
entrypoint: /bin/sh -c "apt-get update && apt-get install -y curl && text-embeddings-router --json-output --model-id ${EMBEDDING_MODEL_ID} --auto-truncate"
@@ -52,7 +58,7 @@ services:
5258
ENABLE_EXPERIMENTAL_FLAGS: true
5359
host_ip: ${host_ip}
5460
healthcheck:
55-
test: ["CMD-SHELL", "curl -f http://$host_ip:8090/health || exit 1"]
61+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
5662
interval: 10s
5763
timeout: 10s
5864
retries: 60
@@ -110,7 +116,7 @@ services:
110116
HF_HUB_ENABLE_HF_TRANSFER: 0
111117
host_ip: ${host_ip}
112118
healthcheck:
113-
test: ["CMD-SHELL", "curl -f http://$host_ip:8808/health || exit 1"]
119+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
114120
interval: 10s
115121
timeout: 10s
116122
retries: 60
@@ -138,11 +144,18 @@ services:
138144
image: ${REGISTRY:-opea}/doc-index-retriever:${TAG:-latest}
139145
container_name: doc-index-retriever-server
140146
depends_on:
141-
- redis-vector-db
142-
- tei-embedding-service
143-
- embedding
144-
- retriever
145-
- reranking
147+
redis-vector-db:
148+
condition: service_started
149+
tei-embedding-service:
150+
condition: service_healthy
151+
embedding:
152+
condition: service_started
153+
dataprep-redis-service:
154+
condition: service_healthy
155+
retriever:
156+
condition: service_started
157+
reranking:
158+
condition: service_started
146159
ports:
147160
- "8889:8889"
148161
environment:

DocIndexRetriever/docker_compose/intel/hpu/gaudi/compose_milvus.yaml

+19-7
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ services:
7878
TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
7979
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
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: 10
8186
restart: unless-stopped
8287
depends_on:
8388
tei-embedding-service:
@@ -112,7 +117,7 @@ services:
112117
ENABLE_EXPERIMENTAL_FLAGS: true
113118
host_ip: ${host_ip}
114119
healthcheck:
115-
test: ["CMD-SHELL", "curl -f http://$host_ip:8090/health || exit 1"]
120+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
116121
interval: 10s
117122
timeout: 10s
118123
retries: 60
@@ -173,7 +178,7 @@ services:
173178
HF_HUB_ENABLE_HF_TRANSFER: 0
174179
host_ip: ${host_ip}
175180
healthcheck:
176-
test: ["CMD-SHELL", "curl -f http://$host_ip:8808/health || exit 1"]
181+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
177182
interval: 10s
178183
timeout: 10s
179184
retries: 60
@@ -205,11 +210,18 @@ services:
205210
image: ${REGISTRY:-opea}/doc-index-retriever:${TAG:-latest}
206211
container_name: doc-index-retriever-server
207212
depends_on:
208-
- milvus-standalone
209-
- tei-embedding-service
210-
- embedding
211-
- retriever
212-
- reranking
213+
milvus-standalone:
214+
condition: service_healthy
215+
tei-embedding-service:
216+
condition: service_healthy
217+
embedding:
218+
condition: service_started
219+
dataprep-milvus:
220+
condition: service_healthy
221+
retriever:
222+
condition: service_started
223+
reranking:
224+
condition: service_started
213225
ports:
214226
- "8889:8889"
215227
environment:

0 commit comments

Comments
 (0)