Enable CodeGen,CodeTrans and DocSum model cache for docker compose test. (#1599)

1.Add cache path check
2.Enable CodeGen,CodeTrans and DocSum model cache for docker compose test.

Signed-off-by: ZePan110 <ze.pan@intel.com>
This commit is contained in:
ZePan110
2025-03-04 16:10:20 +08:00
committed by GitHub
parent 8f8d3af7c3
commit c1b5ba281f
12 changed files with 19 additions and 7 deletions

View File

@@ -152,7 +152,14 @@ jobs:
run: |
cd ${{ github.workspace }}/$example/tests
if [[ "$IMAGE_REPO" == "" ]]; then export IMAGE_REPO="${OPEA_IMAGE_REPO}opea"; fi
if [[ "$use_model_cache" == "true" ]]; then export model_cache="/data2/hf_model"; fi
if [[ "$use_model_cache" == "true" ]]; then
if [ -d "/data2/hf_model" ]; then
export model_cache="/data2/hf_model"
else
echo "Model cache directory /data2/hf_model does not exist"
export model_cache="~/.cache/huggingface/hub"
fi
fi
if [ -f ${test_case} ]; then timeout 30m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi
- name: Clean up container after test