ci(docker-image): cache CUDA and cargo builds, mount caches under /var/cache - #69
Merged
Merged
Conversation
…r/cache Two compile streams escaped ccache and dominated warm lanes: OpenCV's CUDA device code (no CUDA launcher, ~19 min re-done every run) and zenoh's cargo build (~9 min cold every run). Add CMAKE_CUDA_COMPILER_LAUNCHER and persist cargo's home in a named volume per OS base. The cargo target directory stays in the build tree: zenoh-c's install hardcodes the library path there, so only the registry and downloads persist. Caching is a CI concern, so every cache knob lives in the workflow's env block and vanilla builds of the same image see none of it. The persistent caches now mount at /var/cache/<purpose> per the FHS, matching the apt cache mounts in the dockerfile, and the local docker compile targets mirror the same scheme.
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.
Two compile streams escaped ccache and dominated warm lanes (~28 of ~40 minutes, measured from log timestamps): OpenCV's CUDA device code, recompiled every run because no CUDA launcher was set, and zenoh's cold cargo build.
CMAKE_CUDA_COMPILER_LAUNCHER=ccache: the images carry ccache 4.12.3, whose nvcc support was verified in-container. A local validation lane (24.04 clang-shared, the exact CI invocation) built and installed all 305 steps with 94.5% hits and the CUDA objects now populating the cache.robotfarm-cargo-<os>volume (registry and crate downloads). The target directory deliberately stays in the build tree: zenoh-c's install hardcodes the library path there, which the first local validation attempt caught./var/cache/<purpose>per the FHS, matching the dockerfile's apt cache mounts; the local docker compile targets mirror the same scheme.