Skip to content

Commit

Permalink
Merge pull request #77 from stackhpc/feat/vllm-cpu-image-build
Browse files Browse the repository at this point in the history
Fix vLLM CPU image build workflow
  • Loading branch information
sd109 authored Feb 14, 2025
2 parents 99031e1 + 7fa85b1 commit c785811
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions .github/workflows/build-push-vllm-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
required: true

jobs:
build_push_image:
build_push_x86_image:
name: Build and push image
runs-on: ubuntu-latest
permissions:
Expand All @@ -36,32 +36,36 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Calculate metadata for image
id: image-meta
uses: docker/metadata-action@v5
- name: Build and push image
run: |
IMAGE=ghcr.io/stackhpc/vllm-cpu:${{ inputs.vllm_ref }}
docker build -f Dockerfile.cpu -t $IMAGE --shm-size=4g .
docker push $IMAGE
build_push_arm64_image:
name: Build and push image
runs-on: ubuntu-24.04-arm
permissions:
contents: read
id-token: write # needed for signing the images with GitHub OIDC Token
packages: write # required for pushing container images
security-events: write # required for pushing SARIF files
steps:
- name: Check out the vLLM repository
uses: actions/checkout@v4
with:
images: ghcr.io/stackhpc/vllm-cpu
# Produce the branch name or tag and the SHA as tags
tags: |
type=raw,value=${{ inputs.vllm_ref }}
repository: vllm-project/vllm
ref: ${{ inputs.vllm_ref }}

- name: Build and push image x86 image
uses: azimuth-cloud/github-actions/docker-multiarch-build-push@master
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
cache-key: vllm-cpu
file: Dockerfile.cpu
platforms: linux/amd64
push: true
tags: ${{ steps.image-meta.outputs.tags }}
labels: ${{ steps.image-meta.outputs.labels }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# TODO: Test whether this works
# - name: Build and push Arm image
# uses: azimuth-cloud/github-actions/docker-multiarch-build-push@master
# with:
# cache-key: vllm-cpu
# file: Dockerfile.cpu
# platforms: linux/arm64
# push: true
# tags: ${{ steps.image-meta.outputs.tags }}
# labels: ${{ steps.image-meta.outputs.labels }}
- name: Build and push image
run: |
IMAGE=ghcr.io/stackhpc/vllm-cpu:${{ inputs.vllm_ref }}-arm64
docker build -f Dockerfile.arm -t $IMAGE --shm-size=4g .
docker push $IMAGE

0 comments on commit c785811

Please sign in to comment.