617c7dc6b9
Build CUDA image (fork) / build (push) Failing after 2m23s
Add a Gitea Actions workflow and multi-stage Containerfile that build this fork's llama-swap (serial scheduler + embedded Svelte UI) from source and layer it on a pinned llama.cpp CUDA server base, then push to the Gitea container registry as v230-cuda-b9821. - docker/fork-cuda.Containerfile: node UI -> go build -> cuda runtime, runs as root to match the upstream non-suffixed image - .gitea/workflows/build-cuda-image.yml: workflow_dispatch (version + llama.cpp build inputs) and push-on-build-files; logs in with REGISTRY_USER/REGISTRY_PASSWORD Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
77 lines
2.5 KiB
YAML
77 lines
2.5 KiB
YAML
name: Build CUDA image (fork)
|
|
|
|
# Builds this fork's llama-swap (serial scheduler + embedded UI) from source and
|
|
# layers it on a pinned llama.cpp CUDA server base, then pushes to the Gitea
|
|
# container registry, e.g. gitea.stevedudenhoeffer.com/steve/llama-swap:v230-cuda-b9821
|
|
#
|
|
# Requires repo secrets: REGISTRY_USER, REGISTRY_PASSWORD (push to the registry).
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
llama_swap_version:
|
|
description: "llama-swap version label (image tag prefix)"
|
|
required: false
|
|
default: "v230"
|
|
llamacpp_build:
|
|
description: "llama.cpp CUDA server build (base image tag suffix)"
|
|
required: false
|
|
default: "b9821"
|
|
# Building the build definition itself kicks off a fresh image.
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- ".gitea/workflows/build-cuda-image.yml"
|
|
- "docker/fork-cuda.Containerfile"
|
|
|
|
env:
|
|
REGISTRY: gitea.stevedudenhoeffer.com
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Compute image metadata
|
|
id: meta
|
|
run: |
|
|
LS_VER="${{ inputs.llama_swap_version || 'v230' }}"
|
|
LCPP="${{ inputs.llamacpp_build || 'b9821' }}"
|
|
{
|
|
echo "image=${REGISTRY}/${{ github.repository }}"
|
|
echo "tag=${LS_VER}-cuda-${LCPP}"
|
|
echo "base_tag=server-cuda-${LCPP}"
|
|
echo "ls_version=${LS_VER}"
|
|
echo "build_date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
} >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: docker/fork-cuda.Containerfile
|
|
push: true
|
|
provenance: false
|
|
build-args: |
|
|
BASE_TAG=${{ steps.meta.outputs.base_tag }}
|
|
LS_VERSION=${{ steps.meta.outputs.ls_version }}
|
|
GIT_HASH=${{ github.sha }}
|
|
BUILD_DATE=${{ steps.meta.outputs.build_date }}
|
|
tags: ${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.tag }}
|
|
|
|
- name: Summary
|
|
run: |
|
|
echo "Pushed ${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.tag }}" >> "$GITHUB_STEP_SUMMARY"
|