Skip to content

Commit b80449b

Browse files
authored
Fix Multimodal & ProductivitySuite Issue (#1820)
1. add data-prep health check 2. add create conda env Signed-off-by: letonghan <letong.han@intel.com>
1 parent 8aa96c6 commit b80449b

3 files changed

Lines changed: 53 additions & 22 deletions

File tree

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ services:
3838
HUGGINGFACEHUB_API_TOKEN: ${MULTIMODAL_HUGGINGFACEHUB_API_TOKEN}
3939
MULTIMODAL_DATAPREP: true
4040
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_MULTIMODALREDIS"
41+
healthcheck:
42+
test: ["CMD-SHELL", "curl -f http://localhost:5000/v1/health_check || exit 1"]
43+
interval: 10s
44+
timeout: 5s
45+
retries: 50
4146
restart: unless-stopped
4247
embedding-multimodal-bridgetower:
4348
image: ${REGISTRY:-opea}/embedding-multimodal-bridgetower:${TAG:-latest}
@@ -140,11 +145,16 @@ services:
140145
image: ${REGISTRY:-opea}/multimodalqna:${TAG:-latest}
141146
container_name: multimodalqna-backend-server
142147
depends_on:
143-
- redis-vector-db
144-
- dataprep-multimodal-redis
145-
- embedding
146-
- retriever-redis
147-
- lvm
148+
redis-vector-db:
149+
condition: service_started
150+
dataprep-multimodal-redis:
151+
condition: service_healthy
152+
embedding:
153+
condition: service_started
154+
retriever-redis:
155+
condition: service_started
156+
lvm:
157+
condition: service_started
148158
ports:
149159
- "8888:8888"
150160
environment:

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

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ services:
3232
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
3333
DATAPREP_TYPE: ${DATAPREP_TYPE}
3434
LOGFLAG: ${LOGFLAG}
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
entrypoint: /bin/sh -c "apt-get update && apt-get install -y curl && text-embeddings-router --json-output --model-id ${EMBEDDING_MODEL_ID} --auto-truncate"
@@ -47,7 +53,7 @@ services:
4753
https_proxy: ${https_proxy}
4854
host_ip: ${host_ip}
4955
healthcheck:
50-
test: ["CMD-SHELL", "curl -f http://$host_ip:6006/health || exit 1"]
56+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
5157
interval: 10s
5258
timeout: 10s
5359
retries: 60
@@ -106,7 +112,7 @@ services:
106112
HF_HUB_ENABLE_HF_TRANSFER: 0
107113
host_ip: ${host_ip}
108114
healthcheck:
109-
test: ["CMD-SHELL", "curl -f http://$host_ip:8808/health || exit 1"]
115+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
110116
interval: 10s
111117
timeout: 10s
112118
retries: 60
@@ -147,7 +153,7 @@ services:
147153
HF_HUB_ENABLE_HF_TRANSFER: 0
148154
host_ip: ${host_ip}
149155
healthcheck:
150-
test: ["CMD-SHELL", "curl -f http://${host_ip}:9009/health || exit 1"]
156+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
151157
interval: 10s
152158
timeout: 10s
153159
retries: 100
@@ -176,15 +182,24 @@ services:
176182
image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
177183
container_name: chatqna-xeon-backend-server
178184
depends_on:
179-
- redis-vector-db
180-
- tei-embedding-service
181-
- dataprep-redis-service
182-
- retriever
183-
- tei-reranking-service
184-
- tgi_service
185-
- embedding
186-
- reranking
187-
- llm
185+
redis-vector-db:
186+
condition: service_started
187+
tei-embedding-service:
188+
condition: service_healthy
189+
dataprep-redis-service:
190+
condition: service_healthy
191+
retriever:
192+
condition: service_started
193+
tei-reranking-service:
194+
condition: service_healthy
195+
tgi_service:
196+
condition: service_healthy
197+
embedding:
198+
condition: service_started
199+
reranking:
200+
condition: service_started
201+
llm:
202+
condition: service_started
188203
ports:
189204
- "8888:8888"
190205
environment:
@@ -218,10 +233,10 @@ services:
218233
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
219234
host_ip: ${host_ip}
220235
healthcheck:
221-
test: ["CMD-SHELL", "curl -f http://$host_ip:8028/health || exit 1"]
236+
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
222237
interval: 10s
223238
timeout: 10s
224-
retries: 30
239+
retries: 100
225240
command: --model-id ${LLM_MODEL_ID_CODEGEN}
226241
llm_codegen:
227242
image: ${REGISTRY:-opea}/llm-textgen:${TAG:-latest}

ProductivitySuite/tests/test_compose_on_xeon.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,18 @@ function validate_frontend() {
334334
cd $WORKPATH/ui/react
335335
local conda_env_name="OPEA_e2e"
336336
export PATH=${HOME}/miniforge3/bin/:$PATH
337-
# conda remove -n ${conda_env_name} --all -y
338-
# conda create -n ${conda_env_name} python=3.12 -y
337+
338+
if conda info --envs | grep -q "^${conda_env_name}[[:space:]]"; then
339+
echo "[ TEST INFO ]: Conda environment '${conda_env_name}' exists. Activating..."
340+
else
341+
echo "[ TEST INFO ]: Conda environment '${conda_env_name}' not found. Creating..."
342+
conda create -n "${conda_env_name}" python=3.12 -y
343+
fi
344+
339345
source activate ${conda_env_name}
340346
echo "[ TEST INFO ]: --------- conda env activated ---------"
341347

342-
# conda install -c conda-forge nodejs=22.6.0 -y
348+
conda install -c conda-forge nodejs=22.6.0 -y
343349
npm install && npm ci
344350
node -v && npm -v && pip list
345351

0 commit comments

Comments
 (0)