Skip to content

Remove git and Git LFS from the container images - #7856

Merged
kellyguo11 merged 9 commits into
isaac-sim:developfrom
hujc7:jichuanh/drop-container-git
Oct 9, 2026
Merged

kellyguo11 merged 9 commits into
isaac-sim:developfrom
hujc7:jichuanh/drop-container-git

Conversation

@hujc7

@hujc7 hujc7 commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Isaac Lab's base, cuRobo, and kit-less container images stop shipping Git LFS. That clears the three
golang.org/x/crypto scanner findings in nvbug 6782864 instead of waiting on an upstream Git LFS
release. git stays 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.0 out of it
and raise GO-2026-6303 / 6354 / 6355. No Git LFS release carries the fixed x/crypto v0.56.0 yet.

  • The installer is deleted, along with its references in all three Dockerfiles, the dependency-hash
    inputs, and the kit-less workflow path filter.
  • Each image build now fails if git-lfs is on PATH. This catches a copy inherited from the Isaac
    Sim base image, which the deleted installer used to purge. It replaces the old Dockerfile-text test.
  • The images keep git, but CI's checkout is made with lfs: true and requires the LFS filter, so any
    git call on that bind-mounted tree would fail. run_tests.sh and multi_gpu_host_launcher.sh
    mount a tmpfs over /workspace/isaaclab/.git, matching the images, where .dockerignore already
    drops .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

Check Result
Dockerfile.kitless built from this branch built; git 2.43.0 present, git-lfs absent
Dockerfile.base built on public isaac-sim:6.1.0 git-lfs check step passes
check run in isaac-lab:latest-develop and develop's kit-less image fails, finds /usr/local/bin/git-lfs
check run in plain Ubuntu 24.04 passes
docker/test 40 passed, 4 skipped; 2 test_docker_profiles cases stop at an interactive X11 prompt on the dev box

Dockerfile.curobo was not built locally; CI is its first build with this change.

Type of change

  • Breaking change (existing functionality will not work without user modification)

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

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.
@hujc7

hujc7 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added isaac-lab Related to Isaac Lab team infrastructure labels Sep 16, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 16, 2026
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.
@hujc7

hujc7 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 16, 2026
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.
@hujc7

hujc7 commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 1, 2026
hujc7 added 2 commits October 2, 2026 09:59
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.
@hujc7

hujc7 commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 2, 2026
@hujc7
hujc7 marked this pull request as ready for review October 2, 2026 18:55
@hujc7
hujc7 requested a review from a team October 2, 2026 18:55
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Removes Git LFS from container build images.

The PR should not merge until volume-mounted benchmark runs retain their commit and branch provenance.

Findings

  1. P1 Benchmark revision data disappears ▶
  2. P2 Image contents go unchecked ▶

Summary

The PR removes the Git LFS installer from both container builds while retaining Git, masks checkout metadata in two CI container launchers, and updates dependency-hash inputs and tests.

  • Masking .git also removes benchmark revision provenance in volume-mounted runs.
  • The replacement test does not verify binary absence in built images.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'upstream/d..."

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +63 to +66
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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Image contents go unchecked

This test reads Dockerfile text, not the built images. If the external Isaac Sim base image contains Git LFS, the test passes even though the shipped base image still contains the binary targeted for removal. A built-image absence check would catch that case.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 322d0a5. The absence check now runs inside each image build, against the actual image contents, instead of reading Dockerfile text.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 git while its LFS filter executable is removed. The resulting bind-mounted-checkout hazard is handled by duplicate --tmpfs /workspace/isaaclab/.git arguments in run_tests.sh and multi_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 runtime git.
  • 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-lfs executable, 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-lfs safeguard. Because Dockerfile.base inherits 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_lfs does 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-sensitive git[-_]lfs pattern because the relevant comments use Git 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@hujc7

hujc7 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 9, 2026
@kellyguo11
kellyguo11 merged commit 367267d into isaac-sim:develop Oct 9, 2026
63 of 93 checks passed
kellyguo11 pushed a commit that referenced this pull request Oct 10, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants