Skip to content

ci: add arm64 build cache and self-hosted runner cleanup#9

Merged
marksverdhei merged 7 commits into
mainfrom
ci/docker-cache-and-cleanup
Mar 19, 2026
Merged

ci: add arm64 build cache and self-hosted runner cleanup#9
marksverdhei merged 7 commits into
mainfrom
ci/docker-cache-and-cleanup

Conversation

@marksverdhei

Copy link
Copy Markdown
Owner

Summary

  • Registry-based build cache for arm64 — pushes layers to buildcache-arm64 tag on DockerHub, pulls on subsequent runs. Should cut the ~26min QEMU cross-compilation time significantly.
  • Cleanup steps — both jobs prune temp images and buildx cache older than 72h to prevent garbage accumulation on self-hosted runners.

Test plan

  • Workflow syntax is valid
  • First run populates cache (will be slower)
  • Second run pulls from cache (should be faster)

🤖 Generated with Claude Code

marksverdhei and others added 7 commits March 18, 2026 09:17
- Registry-based build cache for arm64 QEMU cross-compilation
- Cleanup steps on both jobs to prevent garbage accumulation
- Remove temp ci-build image after amd64 push
- Prune buildx cache and dangling images older than 72h

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Force Docker V2 media types (oci-mediatypes=false), disable SBOM
attestations, and use gzip compression to avoid DockerHub rejecting
large layer blobs from buildx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mode=max tries to push all layers (including multi-GB CUDA base) as
cache, triggering DockerHub 400 errors. mode=min only caches final
image layers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The successful arm64 builds on Mar 16 had no registry cache.
Removing cache-from/cache-to to verify the image push works
without cache interference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Registry cache (type=registry) triggers DockerHub 400 errors on large
CUDA layers. GHA cache (type=gha) stores build cache in GitHub's blob
storage, avoiding DockerHub entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Registry cache triggers DockerHub 400 errors (buildx#271). Local cache
on the self-hosted runner avoids network roundtrips entirely.

- BuildKit GC capped at 20GB via maxUsedSpace
- Cache rotated after each build to prevent unbounded growth
- buildx prune --keep-storage 20g as safety net

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marksverdhei marksverdhei merged commit e72aa1f into main Mar 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant