4646# -e TEST_FILTER_PATTERN="isaaclab_physx" \
4747# -e TEST_INCLUDE_FILES="test_rigid_object_collection.py" \
4848# -v "$PWD":/workspace/isaaclab isaac-lab-base:latest \
49- # -c 'cd /workspace/isaaclab && /isaac-sim/python .sh -m pytest tools -v'
49+ # -c 'cd /workspace/isaaclab && ./isaaclab .sh -p -m pytest tools -v'
5050#
5151# Remember to REVERT all temporary changes before merging!
5252# =============================================================================
@@ -169,6 +169,25 @@ jobs:
169169 echo "ci_image_tag=isaac-lab-ci:${sanitized_ref}-${SHA}" >> "$GITHUB_OUTPUT"
170170 echo "CI image tag: isaac-lab-ci:${sanitized_ref}-${SHA}"
171171
172+ test-dockerfile-contract :
173+ name : dockerfile-contract
174+ # Static analysis of the Dockerfile text: no image, no GPU, no Isaac Sim.
175+ runs-on : ubuntu-latest
176+ steps :
177+ - uses : actions/checkout@v6
178+
179+ - name : Set up uv
180+ uses : astral-sh/setup-uv@v6
181+ with :
182+ enable-cache : true
183+
184+ - name : Run Dockerfile contract tests
185+ shell : bash
186+ run : |
187+ set -euo pipefail
188+ uv run --no-project --with pytest \
189+ python -m pytest -q docker/test/test_dockerfile_nonroot.py
190+
172191 # region build jobs
173192 build :
174193 name : Build Base Docker Image
@@ -182,6 +201,12 @@ jobs:
182201 fetch-depth : 1
183202 lfs : true
184203
204+ # The GPU runners have no uv on PATH; the invariant check below needs it.
205+ - name : Set up uv
206+ uses : astral-sh/setup-uv@v6
207+ with :
208+ enable-cache : true
209+
185210 - name : Build and push to ECR
186211 uses : ./.github/actions/ecr-build-push-pull
187212 with :
@@ -191,6 +216,20 @@ jobs:
191216 dockerfile-path : docker/Dockerfile.base
192217 cache-tag : cache-base
193218
219+ # #6329 aborts the pip install when it strands a prebundled package's __init__.py
220+ # (nvbugs 6343978: 14 Isaac Sim extensions fail to load). The images install with
221+ # ``uv sync``, which never runs that guard, so assert the same invariant on the image.
222+ - name : Verify image invariants
223+ shell : bash
224+ env :
225+ IMAGE_TAG : ${{ needs.config.outputs.ci_image_tag }}
226+ run : |
227+ set -euo pipefail
228+ IMAGE_DIGEST="$(docker image inspect --format '{{.Id}}' "${IMAGE_TAG}")"
229+ export IMAGE_DIGEST
230+ uv run --no-project --with pytest \
231+ python -m pytest -q docker/test/test_image_invariants.py
232+
194233 build-curobo :
195234 name : Build cuRobo Docker Image
196235 runs-on : [self-hosted, gpu]
@@ -661,16 +700,6 @@ jobs:
661700 # Folded from the former standalone verify-base-non-root job: reuses the
662701 # base image already pulled by run-package-tests to keep the regression
663702 # check without burning a separate runner.
664- - name : Run Dockerfile non-root regression test
665- shell : bash
666- run : |
667- set -euo pipefail
668- docker run --rm \
669- -v "$PWD":/workspace/isaaclab \
670- --entrypoint bash \
671- "${{ needs.config.outputs.ci_image_tag }}" \
672- -lc 'cd /workspace/isaaclab && /isaac-sim/python.sh -m pytest docker/test/test_dockerfile_nonroot.py -q'
673-
674703 - name : Verify Base runtime user is non-root
675704 shell : bash
676705 run : |
@@ -711,16 +740,6 @@ jobs:
711740 # Folded from the former standalone verify-curobo-non-root job: reuses
712741 # the curobo image already pulled by run-package-tests to keep the
713742 # regression check without burning a separate runner.
714- - name : Run Dockerfile non-root regression test
715- shell : bash
716- run : |
717- set -euo pipefail
718- docker run --rm \
719- -v "$PWD":/workspace/isaaclab \
720- --entrypoint bash \
721- "${{ needs.config.outputs.ci_image_tag }}-curobo" \
722- -lc 'cd /workspace/isaaclab && /isaac-sim/python.sh -m pytest docker/test/test_dockerfile_nonroot.py -q'
723-
724743 - name : Verify cuRobo runtime user is non-root
725744 shell : bash
726745 run : |
0 commit comments