Repository navigation
Description
Part of #3488
Depends on: #3484 (docker/Dockerfile.cuda).
Problem / Background
The CUDA image defined in #3484 must be built and pushed by the release workflow so every release has an image that matches its binaries. Today .github/workflows/release.yml publishes only zips and an SBOM.
Image contract (keep identical to #3484)
Image ghcr.io/lablup/mlxcel; tags vX.Y.Z-cuda13 and vX.Y.Z-cuda13-debug for every published tag, latest-cuda13 and latest-cuda13-debug per the rule below; platforms linux/amd64, linux/arm64 in one manifest list. Dockerfile docker/Dockerfile.cuda, targets runtime (default) and debug, build args MLXCEL_VERSION (the release tag, e.g. v0.8.1) and CUDA_VERSION (Dockerfile default).
Current Behavior
build-linux-cuda(release.yml:525, GB10) andbuild-linux-x86_64-cuda(release.yml:761) uploadmlxcel-*-linux-{aarch64,x86_64}-cuda13.zipplus.sha256only whengithub.event_name == 'release'or aworkflow_dispatchwith non-emptyrelease_tag(release.yml:748,999).- Inputs:
release_tag(empty means build-only) andtargets(all,macos,linux,linux-aarch64,linux-x86_64),release.yml:6-20. - Releases are published as prereleases and
promote-release(release.yml:1066-1082) flips them to full releases after all three build jobs succeed.generate-sbom(release.yml:1086) shows the guard for jobs that consume uploaded assets.
Proposed Solution
- New job
publish-imagesinrelease.yml,needs: [build-linux-cuda, build-linux-x86_64-cuda, promote-release],runs-on: ubuntu-latest,permissions: { contents: read, packages: write, id-token: write, attestations: write }. Condition:always() && github.repository == 'lablup/mlxcel' && needs.build-linux-cuda.result == 'success' && needs.build-linux-x86_64-cuda.result == 'success' && (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '' && github.event.inputs.targets == 'all')). Both arches are required because one manifest carries both; a dispatch with a narrowertargetsskips the job. - Steps: checkout the tag (
refas ingenerate-sbom,persist-credentials: false),docker/setup-qemu-action,docker/setup-buildx-action,docker/login-actiontoghcr.iowithGITHUB_TOKEN, then twodocker/build-push-actionruns (targetsruntimeanddebug) withplatforms: linux/amd64,linux/arm64,build-args: MLXCEL_VERSION=<tag>,sbom: true,provenance: mode=max, thenactions/attest-build-provenanceon each pushed digest. Pin every action to a full commit SHA with a version comment. latest-cuda13/latest-cuda13-debugare added only whengithub.event_name == 'release'and the tag has no prerelease suffix (does not match-(alpha|beta|rc)) and eitherneeds.promote-release.result == 'success'orgithub.event.release.prerelease == false.workflow_dispatchnever moveslatest.- PR check in
.github/workflows/ci.yml: jobdocker-buildtriggered whendocker/**or.dockerignorechanges (paths filter),docker buildx build --platform linux/amd64 --target runtimeand--target debugagainst the latest published release tag, no push, no GPU.
Scope
In scope: .github/workflows/release.yml, .github/workflows/ci.yml.
Out of scope: Dockerfile changes (#3484), chart publishing (separate sub-issue), GPU tests in CI.
Implementation Notes
- Reuse: the
ref:andif:patterns ofgenerate-sbom; existing action pin style inrelease.yml. - Edge cases: re-running the workflow for the same tag overwrites the versioned tags with the same content (accepted); a failed arm64 or amd64 build job skips publishing entirely rather than pushing one arch; GHCR package visibility must be public, set once in package settings and noted in the PR.
- Error handling: checksum mismatch in the Dockerfile fails the job; no partial push of
latest.
Acceptance Criteria
- A
workflow_dispatchrun withtargets=alland a test tag (e.g. av0.0.0-docker.1prerelease) pushesghcr.io/lablup/mlxcel:<tag>-cuda13and-debug, and does not touchlatest-cuda13. -
docker buildx imagetools inspect ghcr.io/lablup/mlxcel:<tag>-cuda13listslinux/amd64andlinux/arm64, plus SBOM and provenance attestations;gh attestation verify oci://ghcr.io/lablup/mlxcel:<tag>-cuda13 --repo lablup/mlxcelpasses. - The pulled image passes the feat(docker): Add CUDA container image with mlxcel and mlxcel-server #3484 smoke test (
/health503 then 200, chat completion, CLI entrypoint) on at least one GPU host per arch. - A PR touching
docker/runsdocker-build; a PR not touching it does not. -
actionlintpasses on both workflows.
Verification
actionlint .github/workflows/release.yml .github/workflows/ci.yml
gh workflow run release.yml -f release_tag=<test-tag> -f targets=all
docker buildx imagetools inspect ghcr.io/lablup/mlxcel:<test-tag>-cuda13Implement in one PR with a single verification pass at the end and as few pushes as possible.
Activity
fix(release): decide moving image tags just before moving them
fix(ci): refuse to run the disk cleanup off GitHub-hosted runners
docs: describe CUDA image publish rules in installation guide
chore(release): publish multi-arch CUDA images to GHCR (lablup#3550)