Skip to content

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

Draft
hujc7 wants to merge 2 commits into
isaac-sim:developfrom
hujc7:jichuanh/drop-container-git
Draft

hujc7 wants to merge 2 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 containers stop shipping git and Git LFS — nothing in either runtime image used them,
and their removal clears the three golang.org/x/crypto scanner findings in nvbug 6782864 outright
instead of waiting on an upstream Git LFS release.

Description

docker/scripts/install_git_lfs.sh (added in #7811) installed the upstream Git LFS 3.8.0 binary in
both images. That binary embeds a full Go module manifest, so dependency scanners read
golang.org/x/crypto v0.54.0 out of it and raised GO-2026-6303 / 6354 / 6355. No upstream Git LFS
release carries the fixed x/crypto v0.56.0 yet, so the finding could not be remediated in place.

Neither image needs the pair:

  • CI materialises its lfs: true checkout on the runner and bind-mounts the resulting tree in;
    no step then runs git inside the container.
  • The git+https:// dependencies (rl-games, robomimic) resolve in the kit-less builder
    stage, which keeps git. Only the runtime stage loses it.
  • The version is static — no setuptools_scm — and tools/conftest.py makes no git calls.

Removing only one of the pair is the state that breaks: git-lfs install --system sets
filter.lfs.required=true, so a git without the filter binary fails every call on an LFS tree.
That is the failure the old Dockerfile.kitless comment recorded; the comment now records the
hazard instead of the workaround.

Breaking change

Anything that shells out to git from inside a container now fails, including
isaaclab.utils.assets.retrieve_git_asset_path for remote git asset sources and the benchmark
version recorder. Install git in a derived image, or resolve those paths on the host and mount the
result. Captured in the changelog fragment.

Validation

Built Dockerfile.kitless locally from this branch and checked the image, not the exit code:

Check Result
git / git-lfs on PATH both absent
residual filter.lfs.* system config none
rl_games in the venv (builder resolved its git+ URL) present
import isaaclab, isaaclab_tasks + gym registry OK, 48 Isaac- tasks
pytest source/isaaclab/test/utils --collect-only 833 collected, 3 errors

The 3 errors are all ImportError: AppLauncher requires the full Isaac Sim runtime — pre-existing
for a kit-less image, unrelated to this change.

Dockerfile.base was not built locally; CI is its first build.

test_runtime_images_ship_neither_git_nor_git_lfs fails against the unmodified Dockerfiles and
passes with them, and test_kitless_builder_keeps_git_for_vcs_dependencies guards the builder stage
so a later cleanup cannot silently break dependency resolution.

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

This branch has not been deployed

No deployments
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.

1 participant