|  | 
|  | 1 | +name: Publish vLLM CPU images | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | +  # NOTE(sd109): Since this is checking out an external | 
|  | 5 | +  # it's probably safer to leave this as workflow dispatch | 
|  | 6 | +  # only so that we can manually build images from specific | 
|  | 7 | +  # refs rather than automatically pulling in the latest | 
|  | 8 | +  # content from the remote repo. | 
|  | 9 | +  workflow_dispatch: | 
|  | 10 | +    inputs: | 
|  | 11 | +      vllm_ref: | 
|  | 12 | +        type: string | 
|  | 13 | +        description: The vLLM GitHub ref (tag, branch or commit) to build. | 
|  | 14 | +        required: true | 
|  | 15 | + | 
|  | 16 | +jobs: | 
|  | 17 | +  build_push_x86_image: | 
|  | 18 | +    name: Build and push image | 
|  | 19 | +    runs-on: ubuntu-latest | 
|  | 20 | +    permissions: | 
|  | 21 | +      contents: read | 
|  | 22 | +      id-token: write         # needed for signing the images with GitHub OIDC Token | 
|  | 23 | +      packages: write         # required for pushing container images | 
|  | 24 | +      security-events: write  # required for pushing SARIF files | 
|  | 25 | +    steps: | 
|  | 26 | +      - name: Check out the vLLM repository | 
|  | 27 | +        uses: actions/checkout@v4 | 
|  | 28 | +        with: | 
|  | 29 | +          repository: vllm-project/vllm | 
|  | 30 | +          ref: ${{ inputs.vllm_ref }} | 
|  | 31 | + | 
|  | 32 | +      - name: Login to GitHub Container Registry | 
|  | 33 | +        uses: docker/login-action@v3 | 
|  | 34 | +        with: | 
|  | 35 | +          registry: ghcr.io | 
|  | 36 | +          username: ${{ github.actor }} | 
|  | 37 | +          password: ${{ secrets.GITHUB_TOKEN }} | 
|  | 38 | + | 
|  | 39 | +      - name: Build and push image | 
|  | 40 | +        run: | | 
|  | 41 | +          IMAGE=ghcr.io/stackhpc/vllm-cpu:${{ inputs.vllm_ref }} | 
|  | 42 | +          docker build -f Dockerfile.cpu -t $IMAGE --shm-size=4g . | 
|  | 43 | +          docker push $IMAGE | 
|  | 44 | +
 | 
|  | 45 | +  build_push_arm64_image: | 
|  | 46 | +    name: Build and push image | 
|  | 47 | +    runs-on: ubuntu-24.04-arm | 
|  | 48 | +    permissions: | 
|  | 49 | +      contents: read | 
|  | 50 | +      id-token: write         # needed for signing the images with GitHub OIDC Token | 
|  | 51 | +      packages: write         # required for pushing container images | 
|  | 52 | +      security-events: write  # required for pushing SARIF files | 
|  | 53 | +    steps: | 
|  | 54 | +      - name: Check out the vLLM repository | 
|  | 55 | +        uses: actions/checkout@v4 | 
|  | 56 | +        with: | 
|  | 57 | +          repository: vllm-project/vllm | 
|  | 58 | +          ref: ${{ inputs.vllm_ref }} | 
|  | 59 | + | 
|  | 60 | +      - name: Login to GitHub Container Registry | 
|  | 61 | +        uses: docker/login-action@v3 | 
|  | 62 | +        with: | 
|  | 63 | +          registry: ghcr.io | 
|  | 64 | +          username: ${{ github.actor }} | 
|  | 65 | +          password: ${{ secrets.GITHUB_TOKEN }} | 
|  | 66 | + | 
|  | 67 | +      - name: Build and push image | 
|  | 68 | +        run: | | 
|  | 69 | +          IMAGE=ghcr.io/stackhpc/vllm-cpu:${{ inputs.vllm_ref }}-arm64 | 
|  | 70 | +          docker build -f Dockerfile.arm -t $IMAGE --shm-size=4g . | 
|  | 71 | +          docker push $IMAGE | 
0 commit comments