Skip to content

[Docker] Rebuild the kit-less image as a single stage - #7671

Draft
hujc7 wants to merge 1 commit into
isaac-sim:mainfrom
hujc7:jichuanh/kitless-single-stage-refactor
Draft

hujc7 wants to merge 1 commit into
isaac-sim:mainfrom
hujc7:jichuanh/kitless-single-stage-refactor

Conversation

@hujc7

@hujc7 hujc7 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

The kit-less image drops from 159 to 114 Dockerfile lines and stops installing a C toolchain
it never uses on x86_64, while a uv run invariant runs against the built image for the first
time. Cold build 109 s, image unchanged at 15.46 GB.

Description

Stacked on #7628 — that PR carries the four runtime uv settings for NVBug 6732972 and should
merge first. Until it does, this PR's diff shows its commits too.

1. Single stage

Dockerfile.kitless was the repo's only image whose final stage was not the stage that ran the
install, which is why ENV had to be declared twice and why nvbugs 6732972 was possible at all.
Merging the stages removes that class of bug rather than patching it.

The builder stage existed to keep a compiler out of the runtime. Measured: 0 of 222 installed
distributions are locally built on x86_64, so build-essential, cmake and python3-dev were
339 MB of unused toolchain. psutil==5.9.8 and pyopengl-accelerate==3.1.10 publish no aarch64
wheels, so those build deps are restored for arm64 only, as Dockerfile.base already does.

2. uv cache mount

Kit-less was the only image without one; base and cuRobo have used --mount=type=cache since
#7405. The mount targets ${HOME}/.cache/uv rather than root's, because this image sets HOME
for the whole build — an unmatched target silently bakes the cache into the layer.

3. Built-image invariant

kitless-docker.yml never passed verify-test-path, so docker/test/test_image_invariants.py
had never run against this image. It now does, with a new assertion that uv run resolves the
shipped environment. Verified to fail on an image with UV_PROJECT_ENVIRONMENT removed and pass
on the fixed one.

4. Validation

Measured on an RTX PRO 6000 (Blackwell), amd64:

Check Result
Cold --no-cache build 109 s, 15.46 GB
OVRTX renderer, --gpus all initialises
Warp / Newton on CUDA warp 1.17.0, newton 1.6.0rc1
uv run with source/ bind-mounted read-only resolves /opt/isaaclab-venv, no stray .venv
docker/test 46 passed, 2 skipped
uv run isaaclab -f clean

arm64 is not verified. PR CI builds amd64 only; the aarch64 path is exercised by
publish-images.yaml after merge. The conditional is confirmed inert on amd64.

A two-phase uv sync (deps, then workspace) was measured and rejected: it made a source-edit
rebuild 6.9× slower (468 s vs 68 s) and the image 14.9 GB larger, because the second sync
rewrites the venv in a later layer.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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

@github-actions github-actions Bot added isaac-lab Related to Isaac Lab team infrastructure labels Sep 9, 2026
Dockerfile.kitless was the only image whose final stage was not the stage that
ran the install, so its uv settings had to be declared twice; nvbugs 6732972 was
the runtime stage missing them. Merging the stages removes that class of bug.

The builder stage existed to keep a compiler out of the runtime. On x86_64 none
of the 222 installed distributions is built locally, so build-essential, cmake
and python3-dev were 339 MB of unused toolchain. psutil and pyopengl-accelerate
publish no aarch64 wheels, so their build dependencies are installed on arm64
only, guarded by dpkg --print-architecture as Dockerfile.base does.

Install through a uv cache mount as the Isaac Sim images do. The mount targets
${HOME}/.cache/uv rather than root's because this image sets HOME for the whole
build, and UV_CACHE_DIR pins the two together so an unmatched mount cannot bake
the cache into a layer.

Retarget UV_PYTHON at the venv after the sync, as Dockerfile.base and
Dockerfile.curobo already do, so a runtime uv pip install does not resolve to
the externally managed system interpreter.

Assert the fix on the built image rather than on the Dockerfile text, and pass
verify-test-path in kitless-docker.yml, which had never run the image invariants
against this image.
@hujc7
hujc7 force-pushed the jichuanh/kitless-single-stage-refactor branch from 1823dd9 to eaec496 Compare September 10, 2026 16:30

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