.github,docker/unified: include vulkan build (#599)

Update docker/unified scripts to support building both cuda and vulkan unified images.
This commit is contained in:
Benson Wong
2026-03-25 06:58:28 +09:00
committed by GitHub
parent 2c282dccad
commit e5e7391b6d
6 changed files with 202 additions and 80 deletions
+11 -6
View File
@@ -30,6 +30,10 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend: [cuda, vulkan]
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -61,24 +65,25 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build unified Docker image
- name: Build unified Docker image (${{ matrix.backend }})
env:
LLAMA_REF: ${{ inputs.llama_cpp_ref || 'master' }}
WHISPER_REF: ${{ inputs.whisper_ref || 'master' }}
SD_REF: ${{ inputs.sd_ref || 'master' }}
LS_VERSION: ${{ inputs.llama_swap_version || 'main' }}
DOCKER_IMAGE_TAG: ghcr.io/mostlygeek/llama-swap:unified
DOCKER_IMAGE_TAG: ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}
# When running under act, use the local builder that has warm ccache.
# On GitHub Actions, BUILDX_BUILDER is unset so docker uses the builder
# created by setup-buildx-action above.
BUILDX_BUILDER: ${{ env.ACT == 'true' && 'llama-swap-builder' || '' }}
run: |
chmod +x docker/unified/build-image.sh
docker/unified/build-image.sh
docker/unified/build-image.sh --${{ matrix.backend }}
- name: Push to GitHub Container Registry
if: ${{ !env.ACT }}
run: |
docker push ghcr.io/mostlygeek/llama-swap:unified
docker tag ghcr.io/mostlygeek/llama-swap:unified ghcr.io/mostlygeek/llama-swap:unified-$(date -u +%Y-%m-%d)
docker push ghcr.io/mostlygeek/llama-swap:unified-$(date -u +%Y-%m-%d)
docker push ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}
DATE_TAG=$(date -u +%Y-%m-%d)
docker tag ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }} ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}-${DATE_TAG}
docker push ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}-${DATE_TAG}