Repository navigation
Conversation
On eicweb, eic_cuda, eic_tf and eic_dev_cuda spent 40-90 min per build type in "preparing build cache for export" (mode=max, ~10 GB builder stages), and most of their recent failures were registry layer cache errors: "unknown blob ... in history" at export, and "no active session" when computing cache keys for layers imported via --cache-from. With the Spack buildcache check (#460) the builder stages are cheap to redo. - scripts/build-eic.sh: add --no-layer-cache / LAYER_CACHE=false, which omits all --cache-from and --cache-to registry options. BuildKit's local cache in the builder instance is still used, so default and nightly builds in one job still share stages. - .gitlab-ci.yml: set LAYER_CACHE=false in the eic job when BUILDER_IMAGE is a cuda_* image. GitHub Actions and non-CUDA images are unchanged. - docs/build-pipeline.md: document the exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qEz4vCZUkz3xKJYKfcaaf
There was a problem hiding this comment.
🟢 Approval recommended
The review surfaced no objective defects—the LAYER_CACHE toggle is correctly plumbed and scoped to the three CUDA images, and the docs and help text match the implementation.
No open issues 🎉
What changed in this PR
This PR disables the registry Docker layer cache for the CUDA-based EIC images (eic_cuda, eic_tf, eic_dev_cuda) on GitLab CI (eicweb). For these ~10 GB builder stages, exporting the mode=max layer cache dominated wall time (40–90 min per build type) and was the source of most recent CUDA job failures (unknown blob … in history, no active session). Since #460's Spack buildcache check makes the builder stages cheap to redo, the registry layer cache now buys little for these images. BuildKit's local cache in the persistent builder and the Spack buildcache are retained.
Changes:
- Add a
--no-layer-cacheflag /LAYER_CACHEenv var toscripts/build-eic.shthat skips every registry--cache-from/--cache-to. - In
.gitlab-ci.yml, theeicjob exportsLAYER_CACHE=falsewhenBUILDER_IMAGEmatchescuda_*, keeping job names unchanged. - Document the exception in
docs/build-pipeline.md.
| File | Description |
|---|---|
scripts/build-eic.sh |
Adds --no-layer-cache flag and LAYER_CACHE env default; wraps all registry --cache-from/--cache-to additions in a LAYER_CACHE != "false" guard, plus help text. |
.gitlab-ci.yml |
In the eic job script, exports LAYER_CACHE=false for cuda_* builder images so CUDA-based images skip the registry layer cache. |
docs/build-pipeline.md |
Documents that CUDA-based EIC images are built without a registry layer cache on eicweb. |
No objective defects were found: the LAYER_CACHE toggle is correctly plumbed and scoped, the cuda_* glob targets exactly the three intended images, GitLab's single-shell script semantics make the export reach build-eic.sh, and the docs and help text match the implementation.
Review effort: Balanced
Problem
On eicweb, the CUDA-based EIC images (
eic_cuda,eic_tf,eic_dev_cuda) spend most of their wall time on the registry layer cache:preparing build cache for exportThe export is
mode=maxover roughly 10 GB builder stages. Most recent CUDA job failures on eicweb are layer-cache errors:unknown blob sha256:… in historyappears at the end of the export after 1.5–6 h. It is deterministic, soretry: 2repeats the whole build.no active session for …: context deadline exceededappears while computing cache keys for layers imported via--cache-from.Since #460, the Spack buildcache check makes the builder stages cheap to redo, so the layer cache buys little for these images.
Change
scripts/build-eic.sh: new--no-layer-cacheflag andLAYER_CACHE=falseenv var. They omit every registry--cache-fromand--cache-to. BuildKit's local cache in the persistentbuilderinstance is still used, so the default and nightly builds in one job still share stages..gitlab-ci.yml: theeicjob exportsLAYER_CACHE=falsewhenBUILDER_IMAGEmatchescuda_*. The variable is exported in the script rather than added to the matrix, so job names stay the same.docs/build-pipeline.md: documents the exception.Unchanged:
basejob, includingcuda_develandcuda_runtime.Validation
I dry-ran
scripts/build-eic.shwith a stubbeddockerin GitLab mode:--cache-fromand one--cache-toflags as before.--no-layer-cacheremoves the ghcr.io--cache-fromflags.The change has not run on eicweb yet. Expect the CUDA jobs to lose the long export step.
Follow-up
The existing
buildcache:eic_cuda-*,eic_tf-*andeic_dev_cuda-*tags in the eicweb registry are no longer read or written. They can be deleted by hand.Generated by Claude Code