Repository navigation
Remove git and Git LFS from the container images - #7856
Conversation
Nothing in either runtime image invoked git. CI materialises its `lfs: true` checkout on the runner before bind-mounting the tree in, and the `git+https://` dependencies still resolve because the kit-less builder stage keeps git. Shipping the upstream Git LFS binary also exposed its Go module manifest to dependency scanners, which is what nvbug 6782864 reports against `golang.org/x/crypto v0.54.0`. Removing the pair resolves that by elimination rather than by waiting on an upstream release. The dangerous state is half the pair: `git-lfs install --system` sets `filter.lfs.required=true`, so a git without the filter binary fails every call on an LFS tree. The contract tests now assert both are absent from the runtime stages and that the builder stage keeps git.
|
run-ci |
The base image is single stage, so ``uv sync`` resolves the ``git+https://`` requirements in the image itself and needs a git executable; removing it failed the build with "Git executable not found". Reinstate git in the apt set and purge it with the last sync that needs it, so the shipped filesystem still carries neither git nor Git LFS. Purging takes only git's own dependencies with it -- git-man, libcurl3t64-gnutls and liberror-perl -- because autoremove skips anything another package still requires.
|
run-ci |
Removing git broke GitPython at import, and with it every RSL-RL run, and the import-time Newton asset clones in dr_legs and fourbar_pole. git ships no Go module manifest, so removing Git LFS alone clears the x/crypto findings. CI's lfs: true checkout leaves filter.lfs.required=true in the bind-mounted .git/config. Both test launchers now pass disable-git-lfs-filter.env so in-container git works without the binary.
|
run-ci |
The images exclude .git through .dockerignore, so training there never reads the checkout's Git LFS rule. CI's launchers now hide the mounted .git the same way, which replaces the GIT_CONFIG_* env file.
|
run-ci |
|
| docker_volume_args=( | ||
| -v "${volume_mount_source}:/workspace/isaaclab:rw" | ||
| # Hide .git as the images do: the checkout's config requires Git LFS, which they do not ship. | ||
| --tmpfs /workspace/isaaclab/.git |
There was a problem hiding this comment.
Benchmark revision data disappears
When CI runs benchmarks with the checkout mounted, this tmpfs hides .git. VersionInfoRecorder then cannot read the commit or branch and silently leaves them out, so captured benchmarks cannot identify the revision that produced them. The multi-GPU launcher uses the same mount.
There was a problem hiding this comment.
Not changing this. The benchmark job (performance-smoke-benchmarks in build.yaml) runs a plain docker run with no checkout mount, and .dockerignore already drops .git/, so benchmarks captured there never carried revision data, before or after this PR. The tmpfs only affects volume-mounted pytest lanes, where VersionInfoRecorder treats a failed git call as no info.
There was a problem hiding this comment.
You're right — I incorrectly assumed the benchmark checkout was volume-mounted. The benchmark job runs without the checkout mount, and .dockerignore already excludes .git, so this tmpfs does not remove revision metadata from benchmarks. It only affects the volume-mounted pytest lanes, where VersionInfoRecorder already tolerates missing Git metadata. This is not an issue.
| text = (REPO_ROOT / "docker" / name).read_text(encoding="utf-8") | ||
| self.assertIn("COPY docker/scripts/install_git_lfs.sh /tmp/install_git_lfs.sh", text) | ||
| self.assertIn("RUN /bin/bash /tmp/install_git_lfs.sh", text) | ||
| self.assertLess(text.index("RUN /bin/bash /tmp/install_git_lfs.sh"), text.index("USER isaaclab")) | ||
|
|
||
| def test_git_lfs_changes_invalidate_dependency_cache(self): | ||
| action = REPO_ROOT / ".github/actions/_lib/compute-deps-hash/action.yml" | ||
| self.assertIn("docker/scripts/install_git_lfs.sh", action.read_text(encoding="utf-8")) | ||
| for line in text.splitlines(): | ||
| if not line.lstrip().startswith("#"): | ||
| self.assertNotRegex(line, r"git[-_]lfs") |
There was a problem hiding this comment.
There was a problem hiding this comment.
Fixed in 322d0a5. The absence check now runs inside each image build, against the actual image contents, instead of reading Dockerfile text.
There was a problem hiding this comment.
Isaac Lab Review Bot
The Git LFS installer and related references are removed consistently, but the image contract is not yet enforced at the image boundary: launchers duplicate .git masking, the base image no longer purges an inherited git-lfs, and the replacement test only inspects Dockerfile text rather than built-image contents. The intentional Git LFS removal is also a breaking container contract without a deprecation bridge.
- Design and architecture: The kit-less runtime still installs
gitwhile its LFS filter executable is removed. The resulting bind-mounted-checkout hazard is handled by duplicate--tmpfs /workspace/isaaclab/.gitarguments inrun_tests.shandmulti_gpu_host_launcher.sh, requiring every launcher to preserve the workaround and making tests silently operate outside a repository. Enforce the intended package state at the image boundary instead, such as by removing runtimegit. - Scope and complexity: Scope is cohesive; no split recommended. The nine-file, 213-line change is centered on removing Git LFS and updating its image, launcher, cache-routing, test, and changelog integration points. The required corrections remain within those same boundaries.
- API: No Python or extension-facing symbols change. The affected public surface is the published container package set and behavior: the
git-lfsexecutable, system filter configuration, documentation files, and removed installer path. The launcher workaround also changes repository discovery inside CI containers by masking.git. - Compatibility and deprecation: Breaking changes: published runtime images stop intentionally providing Git LFS, so in-container LFS operations and derived images relying on that executable no longer work. The changelog supplies migration guidance, but it does not provide the required old-contract-functional transition, targeted warning, removal guidance through a deprecation period, or transition coverage. In addition, the intended removal is not reliable until the base image explicitly purges or verifies the absence of an inherited distro
git-lfs. - Implementation: The Dockerfile references, dependency-cache input, workflow path filter, and obsolete installer are cleaned up consistently. However, deleting the installer also deletes its explicit
apt-get remove -y git-lfssafeguard. BecauseDockerfile.baseinherits its package set, it can retain a distro Git LFS binary—and its embedded Go dependencies—despite the stated security objective. Purge the package explicitly or verify its absence against the built base image. - Style consistency: The changed shell and Dockerfile formatting follows adjacent patterns. The launcher comments are concise, but they document a duplicated cross-launcher workaround whose maintenance risk is architectural rather than a separate prose issue.
- Test quality: The obsolete installer tests and dependency-hash assertion appropriately disappear with their production owner. The replacement
test_images_ship_no_git_lfsdoes not establish its named built-image contract: it is an exact negative source grep and cannot detect a binary inherited from a base image or installed through another mechanism. Its comment-skipping logic also has no effect on the added case-sensitivegit[-_]lfspattern because the relevant comments useGit LFS. Validate the built images at the existing image-invariant boundary, or accurately narrow and simplify the source-level assertion.
Significant concerns. Posted 3 actionable findings inline.
Automated review; human maintainers own approval decisions.
| docker_volume_args=( | ||
| -v "${volume_mount_source}:/workspace/isaaclab:rw" | ||
| # Hide .git as the images do: the checkout's config requires Git LFS, which they do not ship. | ||
| --tmpfs /workspace/isaaclab/.git |
There was a problem hiding this comment.
🟡 Warning · Design Architecture — Per-launcher masking compensates for image state
The kit-less runtime still installs git while losing the LFS filter, so an LFS checkout bind-mounted into the image breaks any git call. The mitigation is this tmpfs mask, duplicated verbatim in multi_gpu_host_launcher.sh, so every future launcher must repeat it and container tests silently see a non-repository. Resolve it in the image (drop runtime git, or neutralize the LFS filter) instead of per launch site.
There was a problem hiding this comment.
Keeping the per-launcher tmpfs. Overriding the LFS filter in the images' system git config was the earlier approach and was replaced on purpose (b003f91). The tmpfs makes the two CI launchers match the images, where .dockerignore already keeps .git out.
| # Remove an inherited distro build as well: leaving it at /usr/bin would ship | ||
| # a second executable with its own older embedded Go runtime. | ||
| if dpkg-query -W -f='${Status}' git-lfs 2>/dev/null | grep -qx 'install ok installed'; then | ||
| apt-get remove -y git-lfs |
There was a problem hiding this comment.
🟡 Warning · Implementation — Inherited distro git-lfs is no longer purged
The deleted installer removed an inherited distro git-lfs package, noting that leaving it at /usr/bin ships a second executable with its own older embedded Go runtime. Dropping the installer removes that purge with no replacement, so Dockerfile.base can still carry the distro binary and the golang.org/x/crypto finding this change targets, while the changelog states Git LFS was removed. Purge it explicitly or verify absence in the built base image.
There was a problem hiding this comment.
Fixed in 322d0a5. Every image build (base, cuRobo, kit-less) now fails if git-lfs is on PATH, so an inherited distro copy can't ship unnoticed. The check passes on the public isaac-sim:6.1.0 base and fails on images that still have the old installer.
| self.assertGreaterEqual(tuple(map(int, packages[name].split("."))), tuple(map(int, version.split(".")))) | ||
|
|
||
| def test_both_images_install_verified_git_lfs(self): | ||
| def test_images_ship_no_git_lfs(self): |
There was a problem hiding this comment.
🔵 Suggestion · Test Quality — Grep over-promises and carries a dead branch
The name asserts the shipped images contain no Git LFS, but the test only greps two Dockerfiles and would pass when the binary is inherited from the base image or installed under another name. The comment-skipping branch is also unreachable: the pattern git[-_]lfs is case-sensitive and the added comments spell "Git LFS". Rename it to the Dockerfile-level contract and collapse it to a single assertNotIn per file.
There was a problem hiding this comment.
Fixed in 322d0a5. The text-grep test is removed, and an in-build git-lfs absence check in each Dockerfile replaces it.
The upstream Isaac Sim base could still bring a distro git-lfs now that the installer and its purge are gone, and the Dockerfile grep test could not see it. Each image build now fails if git-lfs is on PATH, replacing that test. Drop the installer from the cuRobo image that develop added meanwhile. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
run-ci |
Backports #7856 to `release/3.0.0`. The original cherry-pick conflicted. An NVIDIA inference model proposed this resolution, and deterministic validation confirmed that it changes no paths outside the original PR. Because conflict resolution cannot be certified as an exact patch replay, this PR is intentionally a draft and requires release-maintainer review. | Field | Commit | |---|---| | Original merged change | `367267ddb1022aaf21a313768df66ba824543c98` | | Release base used | `21438b7b59b999515394a6fd71c5aa4a7b5e638a` | | Proposed backport | `2bb83349f6c2962f8ce77e20e04bc6b37f978180` | Co-authored-by: hujc <[email protected]>
Summary
Isaac Lab's base, cuRobo, and kit-less container images stop shipping Git LFS. That clears the three
golang.org/x/cryptoscanner findings in nvbug 6782864 instead of waiting on an upstream Git LFSrelease.
gitstays installed.Description
docker/scripts/install_git_lfs.sh(added in #7811) installed the upstream Git LFS 3.8.0 binary.That binary embeds a Go module manifest, so scanners read
golang.org/x/crypto v0.54.0out of itand raise GO-2026-6303 / 6354 / 6355. No Git LFS release carries the fixed
x/crypto v0.56.0yet.inputs, and the kit-less workflow path filter.
git-lfsis onPATH. This catches a copy inherited from the IsaacSim base image, which the deleted installer used to purge. It replaces the old Dockerfile-text test.
git, but CI's checkout is made withlfs: trueand requires the LFS filter, so anygitcall on that bind-mounted tree would fail.run_tests.shandmulti_gpu_host_launcher.shmount a tmpfs over
/workspace/isaaclab/.git, matching the images, where.dockerignorealreadydrops
.git. The benchmark job does not mount the checkout, so its revision data is unchanged.Breaking change
Git LFS operations inside the containers no longer work. Install Git LFS in a derived image if you
need it. This is captured in the changelog fragment.
Validation
Dockerfile.kitlessbuilt from this branchgit2.43.0 present,git-lfsabsentDockerfile.basebuilt on publicisaac-sim:6.1.0git-lfscheck step passesisaac-lab:latest-developand develop's kit-less image/usr/local/bin/git-lfsdocker/testtest_docker_profilescases stop at an interactive X11 prompt on the dev boxDockerfile.curobowas not built locally; CI is its first build with this change.Type of change
Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there