Skip to content

Commit e06ff64

Browse files
pkkingping1jing2
authored andcommitted
chore: speedup NPU CI by cache (sgl-project#8270)
Signed-off-by: mywaaagh_admin <pkwarcraft@gmail.com> Co-authored-by: ronnie_zheng <zl19940307@163.com>
1 parent cf115a7 commit e06ff64

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/pr-test-npu.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ jobs:
3535
- name: Install dependencies
3636
run: |
3737
bash scripts/npu_ci_install_dependency.sh
38-
# copy required dataset file from our daily cache
38+
# copy required file from our daily cache
3939
cp ~/.cache/modelscope/hub/datasets/otavia/ShareGPT_Vicuna_unfiltered/ShareGPT_V3_unfiltered_cleaned_split.json /tmp
40+
# copy download through proxy
41+
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
4042
4143
- name: Run test
4244
timeout-minutes: 30

scripts/npu_ci_install_dependency.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# Install the required dependencies in CI.
5-
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
4+
# Install the required dependencies from cache
5+
sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
66
apt update -y
7-
apt install -y build-essential cmake python3-pip python3-dev wget net-tools zlib1g-dev lld clang software-properties-common
7+
apt install -y build-essential cmake python3-pip python3-dev wget net-tools zlib1g-dev lld clang software-properties-common curl
88

9-
10-
pip config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple
9+
# Setup pip cache
10+
pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
11+
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
1112
python3 -m pip install --upgrade pip
1213
pip uninstall sgl-kernel -y || true
1314

0 commit comments

Comments
 (0)