chore: speedup NPU CI by cache (#8270)

Signed-off-by: mywaaagh_admin <pkwarcraft@gmail.com>
Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
li chaoran
2025-08-01 08:29:50 +08:00
committed by GitHub
parent 04913430c6
commit fe5086fd8b
2 changed files with 9 additions and 6 deletions

View File

@@ -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