ci(docker): build :jupyter per-arch on native runners in parallel (no QEMU) - #392
Merged
Conversation
… QEMU) The multi-arch :jupyter build ran amd64 natively but arm64 under QEMU emulation — every RUN in the arm64 image (npm, the ~3 GB Qiskit/pip stack) ran ~5-15x slower, pushing the build to ~23 min and causing the earlier flaky arm64 npm ci timeout. Convert to the canonical multi-runner pattern: - A `build` matrix runs each arch on its OWN native runner IN PARALLEL — amd64 on ubuntu-24.04, arm64 on GitHub's native ubuntu-24.04-arm (no emulation). Each pushes its single-arch image BY DIGEST (push-by-digest, no tag) and uploads the digest as an artifact. Per-arch gha cache scopes. - A `merge` job (needs: build) downloads the digests and stitches them into the multi-arch tags via `docker buildx imagetools create` — no rebuild, ~1 min. Wall-clock drops from ~23 min (sequential-ish, emulated) to ~the slower native single-arch build (~5-8 min) + a short merge, and removes the emulation fragility. Triggers, path filter, concurrency, and tags (:jupyter + <sha>-jupyter) are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EiX6E2FzqdLnr8NdysKHP5
The matrix build failed: `invalid reference format: repository name
(JanLahmann/doQumentation) must be lowercase`. github.repository is mixed-case,
and unlike metadata-action's tag output (auto-lowercased), the raw ref used in
the build `outputs` and the merge `imagetools` commands is not. Add a per-job
step that lowercases it (${IMAGE_NAME,,}) and reference that everywhere a raw
docker ref is needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EiX6E2FzqdLnr8NdysKHP5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the emulated multi-arch
:jupyterbuild with a native per-arch matrix. Follow-up to the arm64npm citimeout that flaked the build earlier.Design
buildmatrix — amd64 onubuntu-24.04, arm64 on GitHub's nativeubuntu-24.04-armrunner, in parallel. Each pushes its single-arch image by digest (push-by-digest, no tag) and uploads the digest as an artifact. Per-arch gha cache scopes.merge— downloads the digests and stitches them into the multi-arch tags viadocker buildx imagetools create(no rebuild).Measured (validated on branch, run 29236350266, cold cache)
Previous emulated build: ~23 min. So ~24% faster cold — the honest, modest part. The bigger wins:
npm citimeout that caused the original failure).Triggers, path filter, concurrency, and the published tags (
:jupyter+<sha>-jupyter) are unchanged. Includes a lowercase-ref fix (github.repositoryis mixed-case; the raw ref inoutputs/imagetoolsmust be lowercased, unlike metadata-action's auto-lowercased tags).🤖 Generated with Claude Code