Skip to content

Commit 97eacef

Browse files
SigureMocodex
andcommitted
ci(npu): simplify image dependency downloads
# 🔧 CI/CD - Remove manual MindSpeed-Ops and FLA dependency downloads and use their upstream build flows. - Bypass the build proxy for the Tsinghua package mirror while allowing GitCode requests through it. - Retain the DeepEP target-chip argument and the 15-minute NPU training timeout. Co-authored-by: Codex <noreply@openai.com>
1 parent 840dd66 commit 97eacef

2 files changed

Lines changed: 2 additions & 29 deletions

File tree

‎.github/workflows/integration-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
dockerfile: docker/Dockerfile.npu
168168
platform: linux/arm64
169169
build-args: |
170-
NO_PROXY=localhost,127.0.0.1,::1,gitcode.com,.gitcode.com
170+
NO_PROXY=localhost,127.0.0.1,::1,mirrors.tuna.tsinghua.edu.cn
171171
SOC_VERSION=ascend910_9362
172172
SOC_VERSION_FOR_SGL_BUILD=Ascend910_9362
173173
hash-key: ${{ hashFiles('docker/Dockerfile.npu', '.dockerignore', 'requirements.txt', 'docker/npu_patch/**', '.github/actions/prepare-image/action.yml') }}

‎docker/Dockerfile.npu‎

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,7 @@ RUN pip_install() { pip install "$@" || pip install --index-url https://pypi.org
103103
cd /root/MindSpeed && git checkout core_r0.16.0 && pip install -r requirements.txt && pip install -e . && git checkout e4772499 && \
104104
cd /root/Megatron-LM && git checkout core_v0.16.1 && pip install -e . --no-build-isolation && \
105105
cd /root/Megatron-Bridge && git checkout v0.3.1 && \
106-
cd /root/MindSpeed-Ops && git checkout 33ac80f7 && \
107-
# GitCode's release CDN may require a proxy even when gitcode.com is in NO_PROXY.
108-
makeself_url=https://gitcode.com/cann-src-third-party/makeself/releases/download/release-2.5.0-patch1.0/makeself-release-2.5.0-patch1.tar.gz && \
109-
makeself_redirect=$(curl -fsS -o /dev/null -w '%{redirect_url}' "$makeself_url") && \
110-
curl -fSL --noproxy '' "${makeself_redirect:-$makeself_url}" -o /tmp/makeself.tar.gz && \
111-
echo 'bfa730a5763cdb267904a130e02b2e48e464986909c0733ff1c96495f620369a /tmp/makeself.tar.gz' | sha256sum -c - && \
112-
mkdir -p mindspeed_ops/csrc/third_party/makeself && \
113-
tar -xzf /tmp/makeself.tar.gz --strip-components=1 -C mindspeed_ops/csrc/third_party/makeself && \
114-
rm /tmp/makeself.tar.gz && \
115-
# This upstream archive is byte-identical to CANN's GitCode mirror.
116-
curl -fSL https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip -o /tmp/json.zip && \
117-
echo 'a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d /tmp/json.zip' | sha256sum -c - && \
118-
unzip -q /tmp/json.zip -d mindspeed_ops/csrc/third_party/json && rm /tmp/json.zip && \
119-
pip install -e . --no-build-isolation --no-deps && \
106+
cd /root/MindSpeed-Ops && git checkout 33ac80f7 && pip install -e . --no-build-isolation --no-deps && \
120107
cd /root/MindSpeed-Bridge && git checkout v0.3.1 && pip install -r requirements.txt && pip install -e . --no-deps
121108

122109
# Keep Relax code changes out of the dependency cache.
@@ -164,20 +151,6 @@ RUN git clone https://github.com/sgl-project/sgl-kernel-npu /root/sgl-kernel-npu
164151
# Install AscendC FLA
165152
RUN git clone https://github.com/flashserve/flash-linear-attention-npu.git /root/flash-linear-attention-npu && \
166153
cd /root/flash-linear-attention-npu && git checkout v26.6.0 && \
167-
# Reuse verified CANN dependencies and prefetch FLA's remaining pinned archives.
168-
# Resolve GitCode redirects before using the proxy for its release CDN.
169-
mkdir -p third_party/pkg && \
170-
cp -a /root/MindSpeed-Ops/mindspeed_ops/csrc/third_party/{makeself,json} third_party/ && \
171-
for dependency in \
172-
'eigen/releases/download/5.0.0-h0.trunk/eigen-5.0.0.tar.gz 93f7f0462988b934e632a9fba58af55192ffceae38e8f46233f4f62cb1e79370' \
173-
'protobuf/releases/download/v25.1/protobuf-25.1.tar.gz 9bd87b8280ef720d3240514f884e56a712f2218f0d693b48050c836028940a42' \
174-
'abseil-cpp/releases/download/20230802.1/abseil-cpp-20230802.1.tar.gz 987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed'; do \
175-
read -r path checksum <<< "$dependency"; \
176-
url="https://gitcode.com/cann-src-third-party/$path"; filename="${path##*/}"; \
177-
redirect=$(curl -fsS -o /dev/null -w '%{redirect_url}' "$url") && \
178-
curl -fSL --noproxy '' "${redirect:-$url}" -o "third_party/pkg/$filename" && \
179-
printf '%s %s\n' "$checksum" "third_party/pkg/$filename" | sha256sum -c - || exit 1; \
180-
done && \
181154
apt update && apt-get install -y --no-install-recommends gawk && \
182155
source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
183156
source /usr/local/Ascend/nnal/atb/set_env.sh && \

0 commit comments

Comments
 (0)