diff --git a/.github/workflows/pr-test-npu.yml b/.github/workflows/pr-test-npu.yml index be924d7bb..faae29781 100644 --- a/.github/workflows/pr-test-npu.yml +++ b/.github/workflows/pr-test-npu.yml @@ -35,8 +35,10 @@ jobs: - name: Install dependencies run: | bash scripts/npu_ci_install_dependency.sh - # copy required dataset file from our daily cache + # copy required file from our daily cache cp ~/.cache/modelscope/hub/datasets/otavia/ShareGPT_Vicuna_unfiltered/ShareGPT_V3_unfiltered_cleaned_split.json /tmp + # copy download through proxy + curl -o /tmp/test.jsonl -L https://gh-proxy.test.osinfra.cn/https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/test.jsonl - name: Run test timeout-minutes: 30 diff --git a/scripts/npu_ci_install_dependency.sh b/scripts/npu_ci_install_dependency.sh index ec3a162d5..3fcb36492 100755 --- a/scripts/npu_ci_install_dependency.sh +++ b/scripts/npu_ci_install_dependency.sh @@ -1,13 +1,14 @@ #!/bin/bash set -euo pipefail -# Install the required dependencies in CI. -sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list +# Install the required dependencies from cache +sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list apt update -y -apt install -y build-essential cmake python3-pip python3-dev wget net-tools zlib1g-dev lld clang software-properties-common +apt install -y build-essential cmake python3-pip python3-dev wget net-tools zlib1g-dev lld clang software-properties-common curl - -pip config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple +# Setup pip cache +pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple +pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local python3 -m pip install --upgrade pip pip uninstall sgl-kernel -y || true