Skip to content

feat: improve spyre logits processors for CB #1457

feat: improve spyre logits processors for CB

feat: improve spyre logits processors for CB #1457

Workflow file for this run

name: "Build Docker"
on:
workflow_dispatch:
push:
branches:
- "main"
paths-ignore:
- "**.md"
pull_request:
branches:
- "main"
paths:
- ".github/workflows/build_docker.yml"
- "docker/**"
- "vllm_spyre/**/*.py"
- "pyproject.toml"
- "uv.lock"
release:
types: [published]
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
CACHE_IMAGE: "ghcr.io/vllm-project/vllm-spyre:build-cache"
QUAY_REPOSITORY: "quay.io/ibm-aiu/vllm-spyre"
permissions:
packages: write
contents: read
steps:
- name: "Checkout"
uses: actions/checkout@v4
# We need to fetch history and tags so that we can correctly version the
# vllm_spyre package, since it uses setuptools_scm to version based on
# git tags.
with:
fetch-depth: 0
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
- name: "Log in to Github Container registry"
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Log in to quay"
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: quay.io
username: ibm-aiu+aiu_pusher_bot
password: ${{ secrets.IBM_AIU_QUAY_TOKEN }}
- name: "Set build cache target"
run: |
# For push to `main` (PR merged), push a new cache image with all layers (cache-mode=max).
# For PR builds, use GitHub action cache which isolates cached layers by PR/branch.
# to optimize builds for subsequent pushes to the same PR/branch.
# Do not set a cache-to image for PR builds to not overwrite the `main` cache image and
# to not ping-pong cache images for two or more different PRs.
# Do not push cache images for each PR or multiple branches to not exceed GitHub package
# usage and traffic limitations.
# UPDATE 2024/02/26: GHA cache appears to have issues, cannot use `cache-to: gha,mode=min`
# if `cache-from: reg...,mode=max` but `cache-to: gha,mode=max` takes longer than uncached
# build and exhausts GHA cache size limits, so use cache `type=inline` (no external cache).
if [ "${{ github.event_name }}" == "pull_request" ]
then
#CACHE_TO="type=gha,mode=min"
CACHE_TO="type=inline"
else
CACHE_TO="type=registry,ref=${{ env.CACHE_IMAGE }},mode=max"
fi
echo "CACHE_TO=$CACHE_TO" >> "$GITHUB_ENV"
- name: "Generate tags"
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.QUAY_REPOSITORY }}
tags: |
type=raw,value=latest.amd64
type=semver,pattern={{version}}.amd64
- name: "Build and push"
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.amd64
target: release
provenance: false
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.CACHE_IMAGE }}
cache-to: ${{ env.CACHE_TO }}
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64