Files
llama-swap-rocm/.github/workflows/unified-docker.yml
T
Benson Wong 916d13f5bd .github/workflows,docker/unified: add cuda based unified container (#597)
Add Docker build scripts for a unified cuda docker container with llama-server, stable-diffusion.cpp, whisper.cpp.
2026-03-22 21:11:54 +09:00

81 lines
2.5 KiB
YAML

name: Build Unified Docker Image
on:
workflow_dispatch:
inputs:
llama_cpp_ref:
description: "llama.cpp commit hash, tag, or branch"
required: false
default: "b8468"
whisper_ref:
description: "whisper.cpp commit hash, tag, or branch"
required: false
default: "v1.8.4"
sd_ref:
description: "stable-diffusion.cpp commit hash, tag, or branch"
required: false
default: "545fac4"
llama_swap_version:
description: "llama-swap version (e.g. v198, latest)"
required: false
default: "v198"
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Free up disk space
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker system prune -af
echo "After cleanup:"
df -h
# On GitHub Actions runners, create a fresh builder.
# When running locally under act, skip this and reuse the existing
# llama-swap-builder (which has ccache warm) to avoid exhausting disk.
- name: Set up Docker Buildx
if: ${{ !env.ACT }}
uses: docker/setup-buildx-action@v3
# Disabled until ready to publish
- name: Log in to GitHub Container Registry
if: false
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build unified Docker image
env:
LLAMA_REF: ${{ inputs.llama_cpp_ref }}
WHISPER_REF: ${{ inputs.whisper_ref }}
SD_REF: ${{ inputs.sd_ref }}
LS_VERSION: ${{ inputs.llama_swap_version }}
DOCKER_IMAGE_TAG: ghcr.io/mostlygeek/llama-swap:unified
# 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
# Disabled until ready to publish
- name: Push to GitHub Container Registry
if: false
run: docker push ghcr.io/mostlygeek/llama-swap:unified