Skip to content

Commit

Permalink
Merge pull request #75 from stackhpc/feat/vllm-cpu-image-build
Browse files Browse the repository at this point in the history
Add vLLM CPU image build workflow
  • Loading branch information
sd109 authored Feb 13, 2025
2 parents f40288e + d30cf50 commit 99031e1
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build-push-vllm-cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish vLLM CPU images

on:
# NOTE(sd109): Since this is checking out an external
# it's probably safer to leave this as workflow dispatch
# only so that we can manually build images from specific
# refs rather than automatically pulling in the latest
# content from the remote repo.
workflow_dispatch:
inputs:
vllm_ref:
type: string
description: The vLLM GitHub ref (tag, branch or commit) to build.
required: true

jobs:
build_push_image:
name: Build and push image
runs-on: ubuntu-latest
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:
repository: vllm-project/vllm
ref: ${{ inputs.vllm_ref }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Calculate metadata for image
id: image-meta
uses: docker/metadata-action@v5
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 }}
- name: Build and push image x86 image
uses: azimuth-cloud/github-actions/docker-multiarch-build-push@master
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 }}

# 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 }}

0 comments on commit 99031e1

Please sign in to comment.