Documented tree replacement (the history has no git-subtree metadata): 3-way merge of the old subtree (570201a:engine/strata) against upstream 41cf05a06a25dd29103b7b27a2279a3f60c21876 (2026-10-25), merge base = the old pin d9ab8435 (tree-identical to upstream 5b734e42; d9ab8435 is not an ancestor of upstream main). Local patches re-applied by hand where they conflicted (15 files): STRATA_CUDA_STATIC profile, experimental KAR experts and KAR PLE arms, keyless V-only arm (now beside upstream's K8V4 hybrid KV and fused norm+rope). Details, conflict table and left-out files are in docs/upstream.md. Left out (weights, captures, logs, media): new bench/results (2022 files), binary media and app assets (61), docs/work/evidence (24), *.bin / *.gguf data files, and the 7 files the first import already left out. scripts/build-cpu.sh: build the 11 CPU tests upstream registered since the old pin (they ran as "Not Run"). Checked: build-cpu.sh 16/16 ctest in WSL; sm_86 CUDA objects of the patched files compile, also with the KAR macros on. No GPU run, no quality gate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
115 lines
4.3 KiB
YAML
115 lines
4.3 KiB
YAML
name: Docker images
|
|
|
|
# Builds the Strata container images of one release from its engine packages and pushes them to ghcr.io.
|
|
# Run by hand only (Actions tab -> Docker images -> Run workflow). Nothing starts it on its own.
|
|
#
|
|
# For each flavor the job downloads the engine package from the release and checks it against the signed update feed
|
|
# (docker/fetch-engines.py: the feed's Ed25519 signature, the archive's SHA-256, the manifest hash, the package signature,
|
|
# every file's hash), builds the image with docker/build.sh and, only when "push" is on, pushes
|
|
# ghcr.io/niko1221/strata:<version>-<flavor> and ghcr.io/niko1221/strata:latest-<flavor>
|
|
# The first run with "push" off builds everything without publishing it (a dry run).
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_tag:
|
|
description: 'Release tag whose engine packages go into the images (for example v0.2.3)'
|
|
required: true
|
|
type: string
|
|
flavors:
|
|
description: 'Flavors to build, comma separated (empty: every flavor the release has a package for)'
|
|
required: false
|
|
default: ''
|
|
type: string
|
|
push:
|
|
description: 'Push the images to ghcr.io (off: build only, nothing is published)'
|
|
required: true
|
|
default: false
|
|
type: boolean
|
|
latest:
|
|
description: 'Also move the latest-<flavor> tags (turn off for a pre-release or a test)'
|
|
required: true
|
|
default: true
|
|
type: boolean
|
|
source_ref:
|
|
description: 'Git ref of the Dockerfile and the Terminal sources (empty: the release tag)'
|
|
required: false
|
|
default: ''
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
IMAGE: ghcr.io/niko1221/strata
|
|
|
|
jobs:
|
|
plan:
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
flavors: ${{ steps.list.outputs.flavors }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.source_ref || inputs.release_tag }}
|
|
- name: Which flavors does the release have a package for
|
|
id: list
|
|
env:
|
|
WANT: ${{ inputs.flavors }}
|
|
TAG: ${{ inputs.release_tag }}
|
|
run: |
|
|
set -eu
|
|
args="--release-tag $TAG --list --skip-missing"
|
|
[ -n "$WANT" ] && args="$args --flavors $WANT"
|
|
python3 docker/fetch-engines.py $args > list.tsv
|
|
cat list.tsv
|
|
flavors=$(awk -F'\t' '$3 != "SKIP" {printf "%s\"%s\"", (n++ ? "," : ""), $1}' list.tsv)
|
|
[ -n "$flavors" ] || { echo "the release has no engine package for any requested flavor"; exit 1; }
|
|
echo "flavors=[$flavors]" >> "$GITHUB_OUTPUT"
|
|
|
|
image:
|
|
needs: plan
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 120
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 3
|
|
matrix:
|
|
flavor: ${{ fromJSON(needs.plan.outputs.flavors) }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.source_ref || inputs.release_tag }}
|
|
- name: Free disk space (the runner has about 14 GB; a package plus its image needs about 10 GB)
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true
|
|
docker system prune -af >/dev/null 2>&1 || true
|
|
df -h /
|
|
- name: Log in to ghcr.io
|
|
if: ${{ inputs.push }}
|
|
env:
|
|
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
REGISTRY_USER: ${{ github.actor }}
|
|
run: printf '%s' "$REGISTRY_TOKEN" | docker login ghcr.io -u "$REGISTRY_USER" --password-stdin
|
|
- name: Fetch, verify, build (and push when push is on)
|
|
env:
|
|
TAG: ${{ inputs.release_tag }}
|
|
FLAVOR: ${{ matrix.flavor }}
|
|
PUSH: ${{ inputs.push && '--push' || '' }}
|
|
LATEST: ${{ !inputs.latest && '--no-latest' || '' }}
|
|
run: |
|
|
docker/publish.sh --release-tag "$TAG" --flavors "$FLAVOR" --image "$IMAGE" $PUSH $LATEST
|
|
- name: Summary
|
|
if: ${{ always() }}
|
|
run: |
|
|
{
|
|
echo "### ${{ matrix.flavor }}"
|
|
echo "- release: ${{ inputs.release_tag }}, pushed: ${{ inputs.push }}"
|
|
echo "- image: \`$IMAGE:${INPUT_TAG#v}-${{ matrix.flavor }}\`"
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
env:
|
|
INPUT_TAG: ${{ inputs.release_tag }}
|