[CI] Add daily images build for nightly ci (#3989)

### What this PR does / why we need it?
Given the current excessively long build time of our nightly-ci, I
recommend installing necessary, confirmed versions of packages in the
Docker image to reduce the time required for integration testing.
Including Mooncake vllm with fixed tags, This is expected to reduce
nightly-ci duration by 2 hours.

- vLLM version: v0.11.0
- vLLM main:
2918c1b49c

---------

Signed-off-by: wangli <wangli858794774@gmail.com>
This commit is contained in:
Li Wang
2025-11-13 20:10:12 +08:00
committed by GitHub
parent f7d1f73b98
commit 7294f89e43
11 changed files with 285 additions and 334 deletions

View File

@@ -0,0 +1,74 @@
name: 'image / nightly / Ubuntu / test'
on:
schedule:
- cron: '0 0,4,8,12,14 * * *'
workflow_call:
inputs:
target:
required: true
type: string
description: 'Target architecture, e.g., a2, a3'
outputs:
image-tag:
description: 'The built image tag'
value: ${{ jobs.build-and-sync.outputs.image-tag }}
secrets:
HW_USERNAME:
required: true
HW_TOKEN:
required: true
# This workflow builds and pushes Docker images for nightly-ci
# It will be built base on the quay.io/ascend/vllm-ascend:main
# And have some customizations for nightly testing, pushing to Huawei Cloud SWR
jobs:
build-and-sync:
runs-on: ubuntu-22.04-arm
strategy:
matrix:
target: ${{ fromJson(github.event_name == 'schedule' && '["a2","a3"]' || format('["{0}"]', inputs.target || 'a3')) }}
outputs:
image-tag: ${{ steps.build-image.outputs.image-tag }}
steps:
- uses: actions/checkout@v4
- name: Show build target
run: |
echo "Building target: ${{ matrix.target }}"
- name: Login to Huawei Cloud SWR
id: login-swr
if: ${{ env.HW_USERNAME != '' && env.HW_TOKEN != '' }}
run: |
echo "${{ env.HW_TOKEN }}" | docker login -u "${{ env.HW_USERNAME }}" --password-stdin swr.cn-southwest-2.myhuaweicloud.com
env:
HW_USERNAME: ${{ secrets.HW_USERNAME }}
HW_TOKEN: ${{ secrets.HW_TOKEN }}
- name: Build image
id: build-image
run: |
TARGET="${{ matrix.target }}"
IMAGE_TAG="swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend:nightly-${TARGET}"
echo "Building image: $IMAGE_TAG"
docker build \
--network host \
--platform linux/arm64 \
-f .github/Dockerfile.nightly.${TARGET} \
--build-arg CANN_VERSION="8.3.rc1" \
--build-arg UBUNTU_VERSION="22.04" \
--build-arg PYTHON_VERSION="3.11" \
-t "$IMAGE_TAG" .
echo "image-tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
# To avoid pushing images from forks, only push when the repository owner is 'vllm-project'
- name: Push image to SWR
if: ${{ github.repository_owner == 'vllm-project' && steps.login-swr.conclusion == 'success' }}
run: |
docker push ${{ steps.build-image.outputs.image-tag }}