Skip to content

Commit 3cba6f7

Browse files
authored
[CI] support daily image and A5 build (vllm-project#13063)
### What this PR does / why we need it? This PR introduces support for using intermediate (Nightly/Dev) versions of CANN, torch_npu, triton-ascend, and MF components specifically for Daily test scenarios. The Release scenario retains the existing stable version locking strategy to ensure production stability. This change is required to enable early validation of upcoming Ascend features without impacting release pipelines. ### Does this PR introduce _any_ user-facing change? Yes. A build_type param (default: release) and version params for CANN/torch_npu/triton-ascend/MF are added. These version params only work when build_type=daily. In default release mode, behavior is unchanged. Existing users are not affected. ### How was this patch tested? Verified daily build with Build_type=daily successfully pulls and compiles the specified intermediate versions of CANN/torch_npu/triton-ascend/MF. - vLLM version: v0.26.0 - vLLM main: vllm-project/vllm@d02df74 --------- Signed-off-by: duping <duping31@h-partners.com>
1 parent c9e95ba commit 3cba6f7

17 files changed

Lines changed: 810 additions & 62 deletions

.github/workflows/_nightly_image_build.yaml

Lines changed: 164 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,56 +29,198 @@ on:
2929
type: string
3030
default: 'main'
3131
description: "Branch/ref to checkout"
32+
build_type:
33+
required: false
34+
type: string
35+
default: 'release'
36+
description: "Build type: 'daily' or 'release'. Daily uses swr.cn-north-4 and quay.io base image."
37+
quay_daily_username:
38+
required: false
39+
type: string
40+
default: ''
41+
description: "Quay username for daily base image pull"
42+
cann_version:
43+
required: false
44+
type: string
45+
default: '2026.07.29'
46+
description: "CANN version for base image tag"
3247
secrets:
3348
HW_USERNAME:
3449
required: false
3550
HW_TOKEN:
3651
required: false
52+
HW_USERNAME_DAILY:
53+
required: false
54+
HW_TOKEN_DAILY:
55+
required: false
3756
GITEE_TOKEN:
3857
required: false
58+
QUAY_DAILY_PASSWORD:
59+
required: false
3960

4061
jobs:
4162
build:
42-
name: Build nightly-${{ inputs.target }} image
43-
runs-on: ubuntu-22.04-arm
63+
name: Build nightly-${{ inputs.target }}-${{ matrix.arch.name }}
64+
runs-on: ${{ matrix.arch.runner }}
65+
strategy:
66+
matrix:
67+
arch:
68+
- name: amd64
69+
runner: ubuntu-latest
70+
platform: linux/amd64
71+
- name: arm64
72+
runner: ubuntu-22.04-arm
73+
platform: linux/arm64
74+
outputs:
75+
swr_registry: ${{ steps.build.outputs.swr_registry }}
76+
swr_temp_registry: ${{ steps.build.outputs.swr_temp_registry }}
77+
tag_prefix: ${{ steps.build.outputs.tag_prefix }}
78+
full_tag: ${{ steps.build.outputs.full_tag }}
79+
build_type: ${{ steps.build.outputs.build_type }}
80+
swr_logged_in: ${{ steps.build.outputs.swr_logged_in }}
4481
steps:
4582
- uses: actions/checkout@v7
4683
with:
4784
fetch-depth: 0
4885
ref: ${{ inputs.vllm_ascend_branch }}
4986

50-
- name: Login to Huawei Cloud SWR
87+
- name: Login to Huawei Cloud SWR (Release)
5188
id: login-swr
52-
if: ${{ env.HW_USERNAME != '' && env.HW_TOKEN != '' }}
89+
if: ${{ inputs.build_type != 'daily' }}
5390
env:
5491
HW_USERNAME: ${{ secrets.HW_USERNAME }}
5592
HW_TOKEN: ${{ secrets.HW_TOKEN }}
5693
run: |
5794
echo "$HW_TOKEN" | docker login -u "$HW_USERNAME" --password-stdin swr.cn-southwest-2.myhuaweicloud.com
5895
96+
- name: Login to Huawei Cloud SWR (Daily)
97+
id: login-swr-daily
98+
if: ${{ inputs.build_type == 'daily' }}
99+
env:
100+
HW_USERNAME_DAILY: ${{ secrets.HW_USERNAME_DAILY }}
101+
HW_TOKEN_DAILY: ${{ secrets.HW_TOKEN_DAILY }}
102+
run: |
103+
docker login -u cn-north-4@"$HW_USERNAME_DAILY" -p "$HW_TOKEN_DAILY" swr.cn-north-4.myhuaweicloud.com
104+
105+
- name: Login to Quay.io (for daily base image pull)
106+
if: ${{ inputs.build_type == 'daily' }}
107+
env:
108+
QUAY_DAILY_PASSWORD: ${{ secrets.QUAY_DAILY_PASSWORD }}
109+
run: |
110+
docker login -u "${{ inputs.quay_daily_username }}" -p "$QUAY_DAILY_PASSWORD" quay.io
111+
59112
- name: Build nightly-${{ inputs.target }} image
113+
id: build
60114
env:
61115
GITEE_USERNAME: ${{ vars.GITEE_USERNAME }}
62116
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
63117
run: |
64118
BRANCH_TAG="${{ inputs.vllm_ascend_branch }}"
65119
BRANCH_TAG="${BRANCH_TAG//\//-}"
66-
IMAGE="swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend:nightly-ci-${BRANCH_TAG}-${{ inputs.target }}"
67-
docker build \
68-
--network host \
69-
--platform linux/arm64 \
70-
-f .github/workflows/dockerfiles/Dockerfile.nightly.${{ inputs.target }} \
71-
--build-arg CANN_VERSION="9.0.1" \
72-
--build-arg UBUNTU_VERSION="22.04" \
73-
--build-arg PYTHON_VERSION="3.12" \
74-
--build-arg VLLM_ASCEND_BRANCH="${BRANCH_TAG}" \
75-
--build-arg GITEE_USERNAME="${GITEE_USERNAME}" \
76-
--build-arg GITEE_TOKEN="${GITEE_TOKEN}" \
77-
-t "$IMAGE" .
78-
79-
- name: Push image to SWR
80-
if: ${{ github.repository_owner == 'vllm-project' && steps.login-swr.conclusion == 'success' }}
120+
121+
if [ "${{ inputs.build_type }}" = "daily" ]; then
122+
SWR_REGISTRY="swr.cn-north-4.myhuaweicloud.com/inference/vllm-ascend"
123+
SWR_TEMP_REGISTRY="swr.cn-north-4.myhuaweicloud.com/inference/vllm-ascend-temp"
124+
TAG_PREFIX="daily"
125+
BASE_IMAGE="quay.io/atlas_inference/vllm-ascend"
126+
else
127+
SWR_REGISTRY="swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend"
128+
SWR_TEMP_REGISTRY="swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend-temp"
129+
TAG_PREFIX="nightly-ci"
130+
BASE_IMAGE=""
131+
fi
132+
133+
CANN_VERSION_LOWER=$(echo "${{ inputs.cann_version }}" | tr '[:upper:]' '[:lower:]')
134+
DATE=$(date +'%Y%m%d')
135+
TAG_SUFFIX=""
136+
if [ "${{ inputs.build_type }}" = "daily" ]; then
137+
if [ "${{ inputs.target }}" = "310p" ]; then
138+
TAG_SUFFIX="-openeuler-cann${CANN_VERSION_LOWER}-${DATE}"
139+
else
140+
TAG_SUFFIX="-cann${CANN_VERSION_LOWER}-${DATE}"
141+
fi
142+
fi
143+
144+
FULL_TAG="${TAG_PREFIX}-${BRANCH_TAG}-${{ inputs.target }}${TAG_SUFFIX}"
145+
IMAGE="${SWR_TEMP_REGISTRY}:${FULL_TAG}-${{ matrix.arch.name }}"
146+
147+
BUILD_ARGS=(
148+
--network host
149+
--platform ${{ matrix.arch.platform }}
150+
-f .github/workflows/dockerfiles/Dockerfile.nightly.${{ inputs.target }}
151+
--build-arg CANN_VERSION="9.0.1"
152+
--build-arg UBUNTU_VERSION="22.04"
153+
--build-arg PYTHON_VERSION="3.12"
154+
--build-arg VLLM_ASCEND_BRANCH="${BRANCH_TAG}"
155+
--build-arg GITEE_USERNAME="${GITEE_USERNAME}"
156+
--build-arg GITEE_TOKEN="${GITEE_TOKEN}"
157+
)
158+
159+
if [ -n "$TAG_SUFFIX" ]; then
160+
BUILD_ARGS+=(--build-arg TAG_SUFFIX="${TAG_SUFFIX}")
161+
fi
162+
163+
if [ -n "$BASE_IMAGE" ]; then
164+
BUILD_ARGS+=(--build-arg BASE_IMAGE="${BASE_IMAGE}")
165+
fi
166+
167+
docker build "${BUILD_ARGS[@]}" -t "$IMAGE" .
168+
169+
# Export outputs for merge job
170+
exec >> $GITHUB_OUTPUT
171+
echo "swr_registry=${SWR_REGISTRY}"
172+
echo "swr_temp_registry=${SWR_TEMP_REGISTRY}"
173+
echo "tag_prefix=${TAG_PREFIX}"
174+
echo "full_tag=${FULL_TAG}"
175+
echo "build_type=${{ inputs.build_type }}"
176+
177+
if [ "${{ github.repository_owner }}" = "vllm-project" ] && [ "${{ steps.login-swr.outcome == 'success' || steps.login-swr-daily.outcome == 'success' }}" = "true" ]; then
178+
echo "swr_logged_in=true"
179+
else
180+
echo "swr_logged_in=false"
181+
fi
182+
183+
- name: Push image to SWR temp
184+
if: ${{ github.repository_owner == 'vllm-project' && (steps.login-swr.conclusion == 'success' || steps.login-swr-daily.conclusion == 'success') }}
81185
run: |
82-
BRANCH_TAG="${{ inputs.vllm_ascend_branch }}"
83-
BRANCH_TAG="${BRANCH_TAG//\//-}"
84-
docker push swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend:nightly-ci-${BRANCH_TAG}-${{ inputs.target }}
186+
SWR_TEMP_REGISTRY="${{ steps.build.outputs.swr_temp_registry }}"
187+
FULL_TAG="${{ steps.build.outputs.full_tag }}"
188+
docker push ${SWR_TEMP_REGISTRY}:${FULL_TAG}-${{ matrix.arch.name }}
189+
190+
merge-image:
191+
name: Merge multi-arch nightly-${{ inputs.target }}
192+
runs-on: ubuntu-latest
193+
needs: build
194+
if: ${{ needs.build.outputs.swr_logged_in == 'true' }}
195+
steps:
196+
- name: Login to Huawei Cloud SWR (Release)
197+
if: ${{ needs.build.outputs.build_type != 'daily' }}
198+
env:
199+
HW_USERNAME: ${{ secrets.HW_USERNAME }}
200+
HW_TOKEN: ${{ secrets.HW_TOKEN }}
201+
run: |
202+
echo "$HW_TOKEN" | docker login -u "$HW_USERNAME" --password-stdin swr.cn-southwest-2.myhuaweicloud.com
203+
204+
- name: Login to Huawei Cloud SWR (Daily)
205+
if: ${{ needs.build.outputs.build_type == 'daily' }}
206+
env:
207+
HW_USERNAME_DAILY: ${{ secrets.HW_USERNAME_DAILY }}
208+
HW_TOKEN_DAILY: ${{ secrets.HW_TOKEN_DAILY }}
209+
run: |
210+
docker login -u cn-north-4@"$HW_USERNAME_DAILY" -p "$HW_TOKEN_DAILY" swr.cn-north-4.myhuaweicloud.com
211+
212+
- name: Create multi-arch manifest
213+
run: |
214+
MAIN_REGISTRY="${{ needs.build.outputs.swr_registry }}"
215+
TEMP_REGISTRY="${{ needs.build.outputs.swr_temp_registry }}"
216+
FULL_TAG="${{ needs.build.outputs.full_tag }}"
217+
218+
MANIFEST_TAG="${MAIN_REGISTRY}:${FULL_TAG}"
219+
AMD64_TAG="${TEMP_REGISTRY}:${FULL_TAG}-amd64"
220+
ARM64_TAG="${TEMP_REGISTRY}:${FULL_TAG}-arm64"
221+
222+
echo "Creating multi-arch manifest: ${MANIFEST_TAG}"
223+
docker buildx imagetools create \
224+
-t "${MANIFEST_TAG}" \
225+
"${AMD64_TAG}" \
226+
"${ARM64_TAG}"

0 commit comments

Comments
 (0)