From a6eaf816f1031da0ba79608a9b60344de9bd48a3 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Fri, 19 Dec 2025 14:35:51 +0800 Subject: [PATCH] [Image] Refactor image build (#5175) ### What this PR does / why we need it? In the past time, we used a hybrid architecture cross-compilation approach for image building. This method had a problem: cross-compilation performance was very poor, leading to extremely long build times(abort 4h) and even a probability of failure(see https://github.com/vllm-project/vllm-ascend/actions/runs/20152861650/job/57849208186). Therefore, I recommend using a separate architecture build followed by manifest merging, which significantly reduces image build time(20min). - vLLM version: v0.12.0 - vLLM main: https://github.com/vllm-project/vllm/commit/ad32e3e19ccf0526cb6744a5fed09a138a5fb2f9 --------- Signed-off-by: wangli --- .github/workflows/_pr_image_build.yaml | 172 ++++++ .../pr_tag_image_build_and_push.yaml | 515 ++---------------- 2 files changed, 208 insertions(+), 479 deletions(-) create mode 100644 .github/workflows/_pr_image_build.yaml diff --git a/.github/workflows/_pr_image_build.yaml b/.github/workflows/_pr_image_build.yaml new file mode 100644 index 00000000..46033ccf --- /dev/null +++ b/.github/workflows/_pr_image_build.yaml @@ -0,0 +1,172 @@ +name: Image_oncall +on: + workflow_call: + inputs: + suffix: + description: 'The tag subfix to use' + required: true + type: string + should_push: + description: 'Whether to push the image' + required: false + type: boolean + default: False + dockerfile: + description: 'The Dockerfile to use' + required: false + type: string + quay_username: + description: 'Quay username for pushing images' + required: false + type: string + secrets: + QUAY_PASSWORD: + description: 'Quay password for pushing images' + required: false + +jobs: + build-push-digest: + name: Image Build and Push + runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - arch: linux/amd64 + runner: ubuntu-latest + tag: amd64 + - arch: linux/arm64 + runner: ubuntu-22.04-arm + tag: arm64 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Free up disk space + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + with: + tool-cache: true + docker-images: false + + - name: Publish - Login to Quay Container Registry + if: ${{ inputs.should_push }} + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ inputs.quay_username }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + install: true + driver: docker-container + use: true + + - name: Build and push + uses: docker/build-push-action@v6 + id: build + with: + platforms: ${{ matrix.arch }} + # use the current repo path as the build context, ensure .git is contained + context: . + file: ${{ inputs.dockerfile || 'Dockerfile' }} + # only trigger when tag, branch/main push + push: ${{ inputs.should_push }} + tags: quay.io/ascend/vllm-ascend + outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ inputs.should_push }} + build-args: | + PIP_INDEX_URL=https://pypi.org/simple + provenance: false + + - name: Export digest + run: | + mkdir -p ${{ runner.temp }}/digests + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ inputs.suffix }}-${{ matrix.tag }} + path: ${{ runner.temp }}/digests/* + if-no-files-found: error + retention-days: 1 + + + merge-image: + runs-on: ubuntu-latest + needs: build-push-digest + if: ${{ inputs.should_push }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download arm64 digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-${{ inputs.suffix }}-arm64 + merge-multiple: true + + - name: Download amd64 digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-${{ inputs.suffix }}-amd64 + merge-multiple: true + + - name: Prepare suffix + id: suffix + run: | + if [ -n "${{ inputs.suffix }}" ]; then + echo "SUFFIX=-${{ inputs.suffix }}" >> $GITHUB_ENV + else + echo "SUFFIX=" >> $GITHUB_ENV + fi + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # TODO(yikun): add more hub image and a note on release policy for container image + images: | + quay.io/ascend/vllm-ascend + # Note for test case + # https://github.com/marketplace/actions/docker-metadata-action#typeref + # 1. branch job pulish per main/*-dev branch commits + # 2. main and dev pull_request is build only, so the tag pr-N-openeuler is fine + # 3. only pep440 matched tag will be published: + # - v0.7.1 --> v0.7.1-openeuler + # - pre/post/dev: v0.7.1rc1-openeuler/v0.7.1rc1-openeuler/v0.7.1rc1.dev1-openeuler/v0.7.1.post1-openeuler, no latest + # which follow the rule from vLLM with prefix v + # TODO(yikun): the post release might be considered as latest release + tags: | + type=ref,event=branch,suffix=${{ env.SUFFIX }} + type=ref,event=pr,suffix=${{ env.SUFFIX }} + type=pep440,pattern={{raw}},suffix=${{ env.SUFFIX }} + flavor: + latest=false + + - name: Login to Quay + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ inputs.quay_username }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Merge and push multi-arch image + env: + IMAGE: quay.io/ascend/vllm-ascend + TAGS: ${{ steps.meta.outputs.tags }} + run: | + DIGESTS=$(printf "$IMAGE@sha256:%s " $(ls ${{ runner.temp }}/digests)) + + echo "Digests: $DIGESTS" + echo "Current tags: $TAGS" + docker buildx imagetools create \ + -t TAGS \ + $DIGESTS diff --git a/.github/workflows/pr_tag_image_build_and_push.yaml b/.github/workflows/pr_tag_image_build_and_push.yaml index aae9a2e1..be9765a7 100644 --- a/.github/workflows/pr_tag_image_build_and_push.yaml +++ b/.github/workflows/pr_tag_image_build_and_push.yaml @@ -16,8 +16,9 @@ on: - 'main' - '*-dev' paths: - - '.github/workflows/image_build_and_push.yml' + - '.github/workflows/pr_tag_image_build_and_push.yaml' - 'Dockerfile*' + - '.github/workflows/_pr_image_build.yml' - 'vllm_ascend/**' - 'setup.py' - 'pyproject.toml' @@ -25,7 +26,7 @@ on: - 'cmake/**' - 'CMakeLists.txt' - 'csrc/**' - types: [ labeled ] + types: [ labeled, synchronize ] push: # Publish image when tagging, the Dockerfile in tag will be build as tag image branches: @@ -34,8 +35,9 @@ on: tags: - 'v*' paths: - - '.github/workflows/image_build_and_push.yaml' - - 'Dockerfile' + - '.github/workflows/pr_tag_image_build_and_push.yaml' + - 'Dockerfile*' + - '.github/workflows/_pr_image_build.yml' - 'vllm_ascend/**' - 'setup.py' - 'pyproject.toml' @@ -44,485 +46,40 @@ on: - 'CMakeLists.txt' - 'csrc/**' + workflow_dispatch: # only cancel in-progress runs of the same workflow concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - a2_ubuntu: - name: A2 Ubuntu Image Build and Push - # Only arm64 build on openEuler arm64, only amd64 build on Ubuntu amd64 - # Push event or PR with both 'ready' and 'ready-for-test' labels - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # TODO(yikun): add more hub image and a note on release policy for container image - images: | - quay.io/ascend/vllm-ascend - # Note for test case - # https://github.com/marketplace/actions/docker-metadata-action#typeref - # 1. branch job pulish per main/*-dev branch commits - # 2. main and dev pull_request is build only, so the tag pr-N is fine - # 3. only pep440 matched tag will be published: - # - v0.7.1 --> v0.7.1, latest - # - pre/post/dev: v0.7.1rc1/v0.7.1rc1/v0.7.1rc1.dev1/v0.7.1.post1, no latest - # which follow the rule from vLLM with prefix v - # TODO(yikun): the post release might be considered as latest release - tags: | - type=ref,event=branch - type=ref,event=pr - type=pep440,pattern={{raw}} - flavor: - latest=true - - - name: Free up disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - docker-images: false - - - name: Build - Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Build - Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Publish - Login to Quay Container Registry - if: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push A2 - uses: docker/build-push-action@v6 - with: - platforms: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'linux/amd64,linux/arm64' || - 'linux/amd64' - }} - # use the current repo path as the build context, ensure .git is contained - context: . - file: Dockerfile - # only trigger when tag, branch/main push - push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - build-args: | - PIP_INDEX_URL=https://pypi.org/simple - provenance: false - - a2_openeuler: - name: A2 openEuler Image Build and Push - # Only arm64 build on openEuler arm64, only amd64 build on Ubuntu amd64 - # Push event or PR with both 'ready' and 'ready-for-test' labels - runs-on: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'ubuntu-latest' || - 'ubuntu-24.04-arm' - }} + image_build: if: ${{ github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test')) }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # TODO(yikun): add more hub image and a note on release policy for container image - images: | - quay.io/ascend/vllm-ascend - # Note for test case - # https://github.com/marketplace/actions/docker-metadata-action#typeref - # 1. branch job pulish per main/*-dev branch commits - # 2. main and dev pull_request is build only, so the tag pr-N-openeuler is fine - # 3. only pep440 matched tag will be published: - # - v0.7.1 --> v0.7.1-openeuler - # - pre/post/dev: v0.7.1rc1-openeuler/v0.7.1rc1-openeuler/v0.7.1rc1.dev1-openeuler/v0.7.1.post1-openeuler, no latest - # which follow the rule from vLLM with prefix v - # TODO(yikun): the post release might be considered as latest release - tags: | - type=ref,event=branch,suffix=-openeuler - type=ref,event=pr,suffix=-openeuler - type=pep440,pattern={{raw}},suffix=-openeuler - flavor: - latest=true - - - name: Free up disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - docker-images: false - - - name: Build - Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Build - Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Publish - Login to Quay Container Registry - if: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push 910b - uses: docker/build-push-action@v6 - with: - platforms: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'linux/amd64,linux/arm64' || - 'linux/arm64' - }} - # use the current repo path as the build context, ensure .git is contained - context: . - # only trigger when tag, branch/main push - push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - file: Dockerfile.openEuler - build-args: | - PIP_INDEX_URL=https://pypi.org/simple - provenance: false - - a3_ubuntu: - name: A3 Ubuntu Image Build and Push - # Only arm64 build on openEuler arm64, only amd64 build on Ubuntu amd64 - # Push event or PR with both 'ready' and 'ready-for-test' labels - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test')) }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # TODO(yikun): add more hub image and a note on release policy for container image - images: | - quay.io/ascend/vllm-ascend - # Note for test case - # https://github.com/marketplace/actions/docker-metadata-action#typeref - # 1. branch job pulish per main/*-dev branch commits - # 2. main and dev pull_request is build only, so the tag pr-N-a3 is fine - # 3. only pep440 matched tag will be published: - # - v0.7.1 --> v0.7.1-a3 - # - pre/post/dev: v0.7.1rc1-a3/v0.7.1rc1-a3/v0.7.1rc1.dev1-a3/v0.7.1.post1-a3, no latest - # which follow the rule from vLLM with prefix v - # TODO(yikun): the post release might be considered as latest release - tags: | - type=ref,event=branch,suffix=-a3 - type=ref,event=pr,suffix=-a3 - type=pep440,pattern={{raw}},suffix=-a3 - flavor: - latest=false - - - name: Free up disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - docker-images: false - - - name: Build - Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Build - Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Publish - Login to Quay Container Registry - if: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push a3 - uses: docker/build-push-action@v6 - with: - platforms: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'linux/amd64,linux/arm64' || - 'linux/amd64' - }} - # use the current repo path as the build context, ensure .git is contained - context: . - file: Dockerfile.a3 - # only trigger when tag, branch/main push - push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - build-args: | - PIP_INDEX_URL=https://pypi.org/simple - provenance: false - - a3_openeuler: - name: A3 openEuler Image Build and Push - # Only arm64 build on openEuler arm64, only amd64 build on Ubuntu amd64 - # Push event or PR with both 'ready' and 'ready-for-test' labels - runs-on: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'ubuntu-latest' || - 'ubuntu-24.04-arm' - }} - if: ${{ github.event_name == 'push' }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # TODO(yikun): add more hub image and a note on release policy for container image - images: | - quay.io/ascend/vllm-ascend - # Note for test case - # https://github.com/marketplace/actions/docker-metadata-action#typeref - # 1. branch job pulish per main/*-dev branch commits - # 2. main and dev pull_request is build only, so the tag pr-N-a3-openeuler is fine - # 3. only pep440 matched tag will be published: - # - v0.7.1 --> v0.7.1-a3-openeuler - # - pre/post/dev: v0.7.1rc1-a3-openeuler/v0.7.1rc1-a3-openeuler/v0.7.1rc1.dev1-a3-openeuler/v0.7.1.post1-a3-openeuler, no latest - # which follow the rule from vLLM with prefix v - # TODO(yikun): the post release might be considered as latest release - tags: | - type=ref,event=branch,suffix=-a3-openeuler - type=ref,event=pr,suffix=-a3-openeuler - type=pep440,pattern={{raw}},suffix=-a3-openeuler - flavor: - latest=false - - - name: Free up disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - docker-images: false - - - name: Build - Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Build - Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Publish - Login to Quay Container Registry - if: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push a3 - uses: docker/build-push-action@v6 - with: - platforms: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'linux/amd64,linux/arm64' || - 'linux/arm64' - }} - # use the current repo path as the build context, ensure .git is contained - context: . - # only trigger when tag, branch/main push - push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - file: Dockerfile.a3.openEuler - build-args: | - PIP_INDEX_URL=https://pypi.org/simple - provenance: false - - _310p_ubuntu: - name: 310P Ubuntu Image Build and Push - # Only arm64 build on openEuler arm64, only amd64 build on Ubuntu amd64 - # Push event or PR with both 'ready' and 'ready-for-test' labels - runs-on: ubuntu-latest - # 310 doesn't work now. Skip it. - # if: ${{ github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test')) }} - if: false - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Print - run: | - lscpu - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # TODO(yikun): add more hub image and a note on release policy for container image - images: | - quay.io/ascend/vllm-ascend - # Note for test case - # https://github.com/marketplace/actions/docker-metadata-action#typeref - # 1. branch job pulish per main/*-dev branch commits - # 2. main and dev pull_request is build only, so the tag pr-N is fine - # 3. only pep440 matched tag will be published: - # - v0.7.1 --> v0.7.1-310p - # - pre/post/dev: v0.7.1rc1-310p/v0.7.1rc1-310p/v0.7.1rc1.dev1-310p/v0.7.1.post1-310p, no latest - # which follow the rule from vLLM with prefix v - # TODO(yikun): the post release might be considered as latest release - tags: | - type=ref,event=branch,suffix=-310p - type=ref,event=pr,suffix=-310p - type=pep440,pattern={{raw}},suffix=-310p - flavor: - latest=false - - - name: Free up disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - docker-images: false - - - name: Build - Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Build - Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Publish - Login to Quay Container Registry - if: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push 310p - uses: docker/build-push-action@v6 - with: - platforms: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'linux/amd64,linux/arm64' || - 'linux/amd64' - }} - # use the current repo path as the build context, ensure .git is contained - context: . - file: Dockerfile.310p - # only trigger when tag, branch/main push - push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - build-args: | - PIP_INDEX_URL=https://pypi.org/simple - provenance: false - - _310p_openeuler: - name: 310P openEuler Image Build and Push - # Only arm64 build on openEuler arm64, only amd64 build on Ubuntu amd64 - # Push event or PR with both 'ready' and 'ready-for-test' labels - runs-on: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'ubuntu-latest' || - 'ubuntu-24.04-arm' - }} - # 310 doesn't work now. Skip it. - # if: ${{ github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test')) }} - if: false - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Print - run: | - lscpu - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # TODO(yikun): add more hub image and a note on release policy for container image - images: | - quay.io/ascend/vllm-ascend - # Note for test case - # https://github.com/marketplace/actions/docker-metadata-action#typeref - # 1. branch job pulish per main/*-dev branch commits - # 2. main and dev pull_request is build only, so the tag pr-N-310p-openeuler is fine - # 3. only pep440 matched tag will be published: - # - v0.7.1 --> v0.7.1-310p-openeuler - # - pre/post/dev: v0.7.1rc1-310p-openeuler/v0.7.1rc1-310p-openeuler/v0.7.1rc1.dev1-310p-openeuler/v0.7.1.post1-310p-openeuler, no latest - # which follow the rule from vLLM with prefix v - # TODO(yikun): the post release might be considered as latest release - tags: | - type=ref,event=branch,suffix=-310p-openeuler - type=ref,event=pr,suffix=-310p-openeuler - type=pep440,pattern={{raw}},suffix=-310p-openeuler - flavor: - latest=false - - - name: Free up disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - docker-images: false - - - name: Build - Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Build - Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Publish - Login to Quay Container Registry - if: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Build and push 310p - uses: docker/build-push-action@v6 - with: - platforms: >- - ${{ - github.event_name == 'push' && github.repository_owner == 'vllm-project' && - 'linux/amd64,linux/arm64' || - 'linux/arm64' - }} - # use the current repo path as the build context, ensure .git is contained - context: . - # only trigger when tag, branch/main push - push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - file: Dockerfile.310p.openEuler - build-args: | - PIP_INDEX_URL=https://pypi.org/simple - provenance: false + name: image build and push + strategy: + matrix: + build_meta: + - name: A2 Ubuntu + dockerfile: Dockerfile + suffix: '' + - name: A2 openeuler + dockerfile: Dockerfile.openEuler + suffix: 'openeuler' + - name: A3 Ubuntu + dockerfile: Dockerfile.a3 + suffix: 'a3' + - name: A3 openEuler + dockerfile: Dockerfile.a3.openEuler + suffix: 'a3-openeuler' + # - name: 310P Ubuntu + # dockerfile: Dockerfile.310p + # - name: 310P openEuler + # dockerfile: Dockerfile.310p.openEuler + uses: ./.github/workflows/_pr_image_build.yaml + with: + dockerfile: ${{ matrix.build_meta.dockerfile }} + suffix: ${{ matrix.build_meta.suffix }} + quay_username: ${{ vars.QUAY_USERNAME }} + should_push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }} + secrets: + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}