From b017bac7c69883249577c963c927b39033bbd454 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Tue, 25 Mar 2025 18:33:39 +0800 Subject: [PATCH 1/3] Use model cache for dataprepl docker compose test. Signed-off-by: ZePan110 --- .github/workflows/manual-comps-test.yml | 1 + .../tei/deployment/docker_compose/compose.yaml | 6 +++--- tests/dataprep/test_dataprep_milvus.sh | 2 +- tests/dataprep/test_dataprep_neo4j_on_intel_hpu.sh | 1 + tests/dataprep/test_dataprep_qdrant.sh | 1 + tests/dataprep/test_dataprep_redis.sh | 1 + tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh | 2 +- tests/dataprep/test_dataprep_redis_multimodal.sh | 1 + 8 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/manual-comps-test.yml b/.github/workflows/manual-comps-test.yml index 6ef2ca43e4..bedadb9181 100644 --- a/.github/workflows/manual-comps-test.yml +++ b/.github/workflows/manual-comps-test.yml @@ -69,4 +69,5 @@ jobs: mode: ${{ inputs.mode }} test_compose: ${{ inputs.test_compose }} test_helmchart: ${{ inputs.test_helmchart }} + use_model_cache: ${{ inputs.use_model_cache }} secrets: inherit diff --git a/comps/third_parties/tei/deployment/docker_compose/compose.yaml b/comps/third_parties/tei/deployment/docker_compose/compose.yaml index 9a96ed5045..59a8eb9f7b 100644 --- a/comps/third_parties/tei/deployment/docker_compose/compose.yaml +++ b/comps/third_parties/tei/deployment/docker_compose/compose.yaml @@ -9,7 +9,7 @@ services: ports: - "${TEI_EMBEDDER_PORT:-12000}:80" volumes: - - "./data:/data" + - "${DATA_PATH-${DATA_PATH-./data}}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} @@ -30,7 +30,7 @@ services: ports: - "${TEI_RERANKING_PORT:-12003}:80" volumes: - - "./data:/data" + - "${DATA_PATH-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} @@ -51,7 +51,7 @@ services: ports: - ${TEI_RERANKING_PORT:-12004}:80 volumes: - - "./data:/data" + - "${DATA_PATH-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} diff --git a/tests/dataprep/test_dataprep_milvus.sh b/tests/dataprep/test_dataprep_milvus.sh index d4b519fba5..15f7a87521 100644 --- a/tests/dataprep/test_dataprep_milvus.sh +++ b/tests/dataprep/test_dataprep_milvus.sh @@ -10,7 +10,7 @@ ip_address=$(hostname -I | awk '{print $1}') DATAPREP_PORT=11101 service_name="dataprep-milvus tei-embedding-serving etcd minio standalone" export TAG="comps" - +export DATA_PATH=${model_cache} SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ${SCRIPT_DIR}/dataprep_utils.sh diff --git a/tests/dataprep/test_dataprep_neo4j_on_intel_hpu.sh b/tests/dataprep/test_dataprep_neo4j_on_intel_hpu.sh index 59ed706aff..e5ded6e9b7 100755 --- a/tests/dataprep/test_dataprep_neo4j_on_intel_hpu.sh +++ b/tests/dataprep/test_dataprep_neo4j_on_intel_hpu.sh @@ -10,6 +10,7 @@ ip_address=$(hostname -I | awk '{print $1}') DATAPREP_PORT=11103 LLM_ENDPOINT_PORT=10510 export TAG="comps" +export DATA_PATH=${model_cache} function build_docker_images() { cd $WORKPATH diff --git a/tests/dataprep/test_dataprep_qdrant.sh b/tests/dataprep/test_dataprep_qdrant.sh index caab45ade9..732e359358 100644 --- a/tests/dataprep/test_dataprep_qdrant.sh +++ b/tests/dataprep/test_dataprep_qdrant.sh @@ -10,6 +10,7 @@ ip_address=$(hostname -I | awk '{print $1}') DATAPREP_PORT="11107" TEI_EMBEDDER_PORT="10220" export TAG="comps" +export DATA_PATH=${model_cache} SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ${SCRIPT_DIR}/dataprep_utils.sh diff --git a/tests/dataprep/test_dataprep_redis.sh b/tests/dataprep/test_dataprep_redis.sh index 6b2af52248..c36f9cf759 100644 --- a/tests/dataprep/test_dataprep_redis.sh +++ b/tests/dataprep/test_dataprep_redis.sh @@ -10,6 +10,7 @@ ip_address=$(hostname -I | awk '{print $1}') DATAPREP_PORT="11108" TEI_EMBEDDER_PORT="10221" export TAG="comps" +export DATA_PATH=${model_cache} SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source ${SCRIPT_DIR}/dataprep_utils.sh diff --git a/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh b/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh index 3ad8fa6a24..f290b491fe 100644 --- a/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh +++ b/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh @@ -53,7 +53,7 @@ function start_vllm_service_70B() { echo "token is ${HF_TOKEN}" model="meta-llama/Llama-3.3-70B-Instruct" vllm_port=8086 - export HF_CACHE_DIR=/data2/hf_model + export HF_CACHE_DIR=${model_cache:-/data2/hf_model} vllm_volume=$HF_CACHE_DIR echo "start vllm gaudi service" diff --git a/tests/dataprep/test_dataprep_redis_multimodal.sh b/tests/dataprep/test_dataprep_redis_multimodal.sh index c3e8bc2559..edb958e398 100644 --- a/tests/dataprep/test_dataprep_redis_multimodal.sh +++ b/tests/dataprep/test_dataprep_redis_multimodal.sh @@ -23,6 +23,7 @@ caption_fn="${tmp_dir}/${image_name}.txt" pdf_name="nke-10k-2023" pdf_fn="${tmp_dir}/${pdf_name}.pdf" DATAPREP_PORT="11109" +export DATA_PATH=${model_cache} function build_docker_images() { cd $WORKPATH From 9e7b13ad176fea12a5e5f3feebd5cd4fea390a87 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Tue, 25 Mar 2025 19:31:51 +0800 Subject: [PATCH 2/3] Fix comments Signed-off-by: ZePan110 --- comps/third_parties/tei/deployment/docker_compose/compose.yaml | 2 +- tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/comps/third_parties/tei/deployment/docker_compose/compose.yaml b/comps/third_parties/tei/deployment/docker_compose/compose.yaml index 59a8eb9f7b..9bfc74f82f 100644 --- a/comps/third_parties/tei/deployment/docker_compose/compose.yaml +++ b/comps/third_parties/tei/deployment/docker_compose/compose.yaml @@ -9,7 +9,7 @@ services: ports: - "${TEI_EMBEDDER_PORT:-12000}:80" volumes: - - "${DATA_PATH-${DATA_PATH-./data}}:/data" + - "${DATA_PATH-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} diff --git a/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh b/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh index f290b491fe..62d4b9ba76 100644 --- a/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh +++ b/tests/dataprep/test_dataprep_redis_finance_on_intel_hpu.sh @@ -53,7 +53,7 @@ function start_vllm_service_70B() { echo "token is ${HF_TOKEN}" model="meta-llama/Llama-3.3-70B-Instruct" vllm_port=8086 - export HF_CACHE_DIR=${model_cache:-/data2/hf_model} + export HF_CACHE_DIR=${model_cache:-./data} vllm_volume=$HF_CACHE_DIR echo "start vllm gaudi service" From 2d78a18eaa17362f6abe19688d66512d86bc8568 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Thu, 27 Mar 2025 18:19:29 +0800 Subject: [PATCH 3/3] Fix typo Signed-off-by: ZePan110 --- .../tei/deployment/docker_compose/compose.yaml | 6 +++--- comps/web_retrievers/deployment/docker_compose/compose.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comps/third_parties/tei/deployment/docker_compose/compose.yaml b/comps/third_parties/tei/deployment/docker_compose/compose.yaml index 9bfc74f82f..f246feacaa 100644 --- a/comps/third_parties/tei/deployment/docker_compose/compose.yaml +++ b/comps/third_parties/tei/deployment/docker_compose/compose.yaml @@ -9,7 +9,7 @@ services: ports: - "${TEI_EMBEDDER_PORT:-12000}:80" volumes: - - "${DATA_PATH-./data}:/data" + - "${DATA_PATH:-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} @@ -30,7 +30,7 @@ services: ports: - "${TEI_RERANKING_PORT:-12003}:80" volumes: - - "${DATA_PATH-./data}:/data" + - "${DATA_PATH:-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} @@ -51,7 +51,7 @@ services: ports: - ${TEI_RERANKING_PORT:-12004}:80 volumes: - - "${DATA_PATH-./data}:/data" + - "${DATA_PATH:-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy} diff --git a/comps/web_retrievers/deployment/docker_compose/compose.yaml b/comps/web_retrievers/deployment/docker_compose/compose.yaml index 276ca6ed4f..1d7145bb00 100644 --- a/comps/web_retrievers/deployment/docker_compose/compose.yaml +++ b/comps/web_retrievers/deployment/docker_compose/compose.yaml @@ -27,7 +27,7 @@ services: ports: - ${TEI_PORT:-6060}:80 volumes: - - "./data:/data" + - "${DATA_PATH:-./data}:/data" shm_size: 1g environment: no_proxy: ${no_proxy}