mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-15 05:09:44 +08:00
The OPENSHELL_CARGO_VERSION build arg contains a git commit hash that changes on every build (e.g. 0.0.7-dev.11+g085b131ae). Declaring this ARG near the top of each Dockerfile invalidated every layer below it -- including expensive dependency installs, toolchain setup, and the Rust dependency pre-build step -- on every single commit. Move the ARG declaration to just before the RUN that actually uses it so upstream layers stay cached. This recovers ~5-6 minutes per build on the gateway image (from ~9m back toward ~2-3m) and similarly improves cluster, CLI, and Python wheel builds. Also removes unused OPENSHELL_IMAGE_TAG ARG from cli-macos, python-wheels, and python-wheels-macos Dockerfiles.