Skip to content

chore(release): Build and publish multi-arch CUDA images to GHCR #3485

Done

Description

@inureyes

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) and build-linux-x86_64-cuda (release.yml:761) upload mlxcel-*-linux-{aarch64,x86_64}-cuda13.zip plus .sha256 only when github.event_name == 'release' or a workflow_dispatch with non-empty release_tag (release.yml:748, 999).
  • Inputs: release_tag (empty means build-only) and targets (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

  1. New job publish-images in release.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 narrower targets skips the job.
  2. Steps: checkout the tag (ref as in generate-sbom, persist-credentials: false), docker/setup-qemu-action, docker/setup-buildx-action, docker/login-action to ghcr.io with GITHUB_TOKEN, then two docker/build-push-action runs (targets runtime and debug) with platforms: linux/amd64,linux/arm64, build-args: MLXCEL_VERSION=<tag>, sbom: true, provenance: mode=max, then actions/attest-build-provenance on each pushed digest. Pin every action to a full commit SHA with a version comment.
  3. latest-cuda13 / latest-cuda13-debug are added only when github.event_name == 'release' and the tag has no prerelease suffix (does not match -(alpha|beta|rc)) and either needs.promote-release.result == 'success' or github.event.release.prerelease == false. workflow_dispatch never moves latest.
  4. PR check in .github/workflows/ci.yml: job docker-build triggered when docker/** or .dockerignore changes (paths filter), docker buildx build --platform linux/amd64 --target runtime and --target debug against 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: and if: patterns of generate-sbom; existing action pin style in release.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_dispatch run with targets=all and a test tag (e.g. a v0.0.0-docker.1 prerelease) pushes ghcr.io/lablup/mlxcel:<tag>-cuda13 and -debug, and does not touch latest-cuda13.
  • docker buildx imagetools inspect ghcr.io/lablup/mlxcel:<tag>-cuda13 lists linux/amd64 and linux/arm64, plus SBOM and provenance attestations; gh attestation verify oci://ghcr.io/lablup/mlxcel:<tag>-cuda13 --repo lablup/mlxcel passes.
  • The pulled image passes the feat(docker): Add CUDA container image with mlxcel and mlxcel-server #3484 smoke test (/health 503 then 200, chat completion, CLI entrypoint) on at least one GPU host per arch.
  • A PR touching docker/ runs docker-build; a PR not touching it does not.
  • actionlint passes 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>-cuda13

Implement in one PR with a single verification pass at the end and as few pushes as possible.

Activity

  1. added
    type:enhancement
    priority:medium
    status:ready
    platform:linux
    type:chore
    status:in-progress
    status:review
    and removed
    type:enhancement
    status:ready
    status:in-progress
    on Nov 27, 2026
  2. added
    status:done
    and removed
    status:review
    on Nov 28, 2026
  3. added a commit that references this issue on Nov 29, 2026
    29b2d65
  4. added this to the 0.9 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:linuxpriority:mediumstatus:donetype:chore

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions