Skip to content

Draft uv native install 2#908

Draft
alexmillane wants to merge 22 commits into
alex/feature/upgrade_lab_to_beta2from
rcathomen/feature/uv-native-install-2
Draft

Draft uv native install 2#908
alexmillane wants to merge 22 commits into
alex/feature/upgrade_lab_to_beta2from
rcathomen/feature/uv-native-install-2

Conversation

@alexmillane

Copy link
Copy Markdown
Collaborator

Summary

Add uv install.

Detailed description

rafaelcathomen and others added 8 commits July 14, 2026 14:51
Import the configclass decorator from its defining module so lazy package
imports cannot shadow it. Defer physics-preset imports until SimulationApp
startup to preserve config class identity during collection.

Handle the solver, stage, and camera API shapes used by the public Isaac Lab
wheel while retaining compatibility with Arena's Docker submodule. Skip the
live endpoint test when its credential is absent.

Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
Move package metadata to PEP 621 and add an Arena-owned uv lock for Python
3.12, the public Isaac Lab 3.0 beta wheel, Isaac Sim 6, and the matching CUDA
PyTorch stack. Keep simulator dependencies in a default PEP 735 group so
Docker continues using its pinned Isaac Lab submodule.

Document the native developer workflow and add a lightweight CI guard for
lock consistency, editable package roots, and runtime resources.

Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
Use strict first-index resolution and route the sole incompatible
NVIDIA/PyPI name collision explicitly to PyPI. Keep the locked package
graph unchanged while making future name collisions fail closed.

Clarify the editable-package check and ignore auxiliary uv environments.

Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
- Default --output_base_dir to ./outputs so the runners work natively and in
  Docker without flags (gitignored); document /eval as the override.
- Lock resolution to Linux x86_64 (tool.uv.environments); drop the per-platform
  torch markers and the cu130 index.
- Move the uv lock/editable validation out of the pre-commit job into its own
  uv_package CI job.
- Align native and Docker verification docs (optional test phases in both);
  reword the uv docs positively and drop the redundant note.
- Annotate the two Isaac Lab version shims (get_local_poses ProxyArray,
  get_current_stage location) for removal on version convergence.

Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
The subprocess-spawning tests hard-coded the Docker submodule interpreter
(submodules/IsaacLab/_isaac_sim/python.sh), which does not exist in the native
uv environment, so every with_subprocess test failed at spawn with
FileNotFoundError before any Isaac Lab code ran. Fall back to the current
interpreter (sys.executable = the uv venv python) when the Docker python.sh is
absent; Docker keeps using python.sh unchanged.

Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
With the interpreter fix the native uv env runs the with_subprocess phase, but
some tests cannot pass outside Docker for environmental reasons. Mark them with
shared skipif markers (active only when the Docker python.sh is absent):

- requires_docker_assets: tests that load assets not yet promoted to the public
  Nucleus (maple_table.usda 404s natively).
- requires_docker_isaaclab: tests hitting API differences between the Docker
  Isaac Lab build and the public 3.0.0b2 wheel (ArticulationCfg in the RL
  training env; contact-view filter_count in mimic data generation). Remove
  once the Isaac Lab versions converge.

Native result: 9 passed, 11 skipped (was 9 passed, 11 failed). Docker runs the
full set unchanged.

Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
Signed-off-by: Rafael Cathomen <rcathomen@nvidia.com>
Rebased onto the beta-2 submodule upgrade, the Docker build and the native uv
env now run the same Isaac Lab 3.0 beta 2 (submodule v3.0.0-beta2.patch1 /
public 3.0.0b2 wheel), so the dual-version accommodations are obsolete:

- Drop the requires_docker_isaaclab skip marker and its two usages: the
  ArticulationCfg duplication is handled by the upgrade's
  _purge_leaked_isaaclab_assets_presets, and the contact-view filter issue by
  the recursiveLeafPatternMatch workaround (IsaacLab #6424).
- Update docs and the stale submodule-version note in pyproject accordingly.
- Register the new isaaclab_arena_curobo package in pyproject packaging and in
  the CI editable-package check (it was added to setup.py, which this branch
  replaces with pyproject.toml).

Signed-off-by: alex <amillane@nvidia.com>

@alexmillane alexmillane left a comment

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.

Self review #1

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +124 to +164
cd /tmp
/tmp/arena-package-venv/bin/python - <<'PY'
import importlib.util
from importlib import metadata
from pathlib import Path

package_roots = (
"isaaclab_arena",
"isaaclab_arena_curobo",
"isaaclab_arena_environments",
"isaaclab_arena_examples",
"isaaclab_arena_g1",
"isaaclab_arena_gr00t",
"isaaclab_arena_openpi",
)
for package_root in package_roots:
assert importlib.util.find_spec(package_root) is not None, package_root

arena_spec = importlib.util.find_spec("isaaclab_arena")
assert arena_spec is not None and arena_spec.origin is not None
repo_root = Path(arena_spec.origin).resolve().parent.parent

discoverable_modules = (
"isaaclab_arena.evaluation.policy_runner",
"isaaclab_arena.tasks.sequential_composite_tasks.franka_put_and_close_door_task",
)
for module in discoverable_modules:
assert importlib.util.find_spec(module) is not None, module

runtime_resources = (
"isaaclab_arena/visualization/report_template.html",
"isaaclab_arena_environments/eval_jobs_configs/zero_action_jobs_config.json",
"isaaclab_arena_g1/g1_env/config/loco_manip_g1_joints_order_43dof.yaml",
"isaaclab_arena_gr00t/policy/config/droid_manip_gr00t_closedloop_config.yaml",
)
for runtime_resource in runtime_resources:
assert (repo_root / runtime_resource).is_file(), runtime_resource

version = metadata.version("isaaclab_arena")
print(f"editable package check passed: {version}")
PY

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.

Can we add this to a test somewhere?

Comment thread docs/pages/quickstart/installation.rst Outdated
Comment on lines +29 to +32
``uv sync`` creates a Python 3.12 virtual environment in ``.venv/`` (pinned by
``.python-version``), installs Isaac Lab Arena, and pulls
``isaaclab[isaacsim,all]==3.0.0b2`` together with the matching Isaac Sim 6.0,
PyTorch, and Newton wheels.

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.

Let's leave out the version of Isaac Lab and Isaac Sim installed such that this documentation remains true over time.

Comment thread .github/workflows/ci.yml
version = metadata.version("isaaclab_arena")
print(f"editable package check passed: {version}")
PY

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.

We need to add running all arena tests. We need to verify that everything works when installed via uv.

Comment thread docs/pages/quickstart/installation.rst Outdated
Comment on lines +40 to +46
Verify both in-process execution modes with one non-camera and one camera smoke
test:

.. code-block:: bash

uv run pytest -q isaaclab_arena/tests/test_achieve_cube_goal_pose.py::test_achieve_cube_goal_pose_initial_state
uv run pytest -q isaaclab_arena/tests/test_camera_observation.py::test_camera_observation

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.

Let's remove this, and instead run all tests at the end. The next command after these should serve as a visual validation that things are running.

Comment thread docs/pages/quickstart/installation.rst Outdated
Comment on lines +55 to +73
Optionally verify the installation by running the in-process test phases (the
same phases the Docker workflow runs below; the third, subprocess-based phase
is currently Docker-only, see the note):

.. code-block:: bash

uv run pytest -sv -m "with_cameras and not with_subprocess" isaaclab_arena/tests/
uv run pytest -sv -m "not with_cameras and not with_subprocess" isaaclab_arena/tests/

.. note::
The policy and evaluation runners write to ``./outputs`` under the current
working directory by default (natively and in Docker alike). Pass
``--output_base_dir`` to redirect, e.g. to Docker's ``/eval`` mount.

.. note::
The third, subprocess-based phase (``-m with_subprocess``) also runs
natively. A few of its tests skip outside Docker, with the reason stated in
the skip marker: they load assets not yet promoted to the public Nucleus.
The Docker workflow below runs the full set.

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.

The test failures should have been fixed in the underlying lab upgrade branch. Suggestion to remove the notes about the failing test and add the third test phase.



@pytest.mark.with_subprocess
@requires_docker_assets # sweeps every registered env, incl. ones whose assets are unpromoted

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.

remove. see comment above.

Comment on lines +1 to +27
# Copyright (c) 2026, The Isaac Lab Arena Project Developers (https://github.com/isaac-sim/IsaacLab-Arena/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Regression test for the Isaac Lab wheel configclass import-order shadowing.

With the public Isaac Lab wheel, importing ``isaaclab.envs.mimic_env_cfg`` (or
``isaaclab_newton``) before ``from isaaclab.utils import configclass`` binds the
``configclass`` *submodule* instead of the decorator, so ``@configclass`` fails.
Arena imports the decorator directly from its defining module to stay
order-safe; this test pins that behaviour with a representative manager cfg.
"""

import subprocess
import sys


def test_manager_cfg_import_survives_configclass_shadowing():
code = (
"from isaaclab.envs.mimic_env_cfg import MimicEnvCfg; "
"import isaaclab_arena.environments.isaaclab_arena_manager_based_env_cfg as _m; "
"print('IMPORT_OK')"
)
result = subprocess.run([sys.executable, "-c", code], capture_output=True, text=True)
assert result.returncode == 0, f"manager cfg import failed:\n{result.stderr}"
assert "IMPORT_OK" in result.stdout

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.

issues solved. remove this test.

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.

Revert the changes on this file.

Comment thread README.md
Comment on lines +76 to +95
```bash
git clone git@github.com:isaac-sim/IsaacLab-Arena.git
cd IsaacLab-Arena
uv sync
```

`uv sync` creates a Python 3.12 virtual environment in `.venv/`, installs Isaac Lab-Arena, and pulls `isaaclab[isaacsim,all]==3.0.0b2` with the matching Isaac Sim 6.0, PyTorch, and Newton wheels — the committed lockfile pins the complete environment. Accept the Isaac Sim EULA non-interactively and run the non-camera and camera smoke tests:

```bash
export OMNI_KIT_ACCEPT_EULA=YES ACCEPT_EULA=Y # accept the Isaac Sim EULA non-interactively
uv run pytest -q isaaclab_arena/tests/test_achieve_cube_goal_pose.py::test_achieve_cube_goal_pose_initial_state
uv run pytest -q isaaclab_arena/tests/test_camera_observation.py::test_camera_observation
```

Launch a short rollout:

```bash
uv run python isaaclab_arena/evaluation/policy_runner.py \
--headless --policy_type zero_action --num_steps 20 cube_goal_pose
```

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.

Shorten these instructions to mask the docker instructions below. A single code block with short one line inline comments to explain the steps.

Comment thread README.md Outdated
Comment on lines +97 to +99
> Outputs land in `./outputs` by default (both natively and in Docker); pass `--output_base_dir` to redirect them, e.g. to Docker's `/eval` mount.
>
> The subprocess-based eval phase (`-m with_subprocess`) also runs natively; a few tests skip outside Docker (unpromoted assets) — see the installation guide.

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.

Remove these notes.

- Replace the CI editable-package heredoc with packaging tests
  (isaaclab_arena/tests/test_packaging.py) run by the uv_package job.
- Add a uv_test CI job that syncs the locked env on the runner host and runs
  all arena test phases natively.
- Drop the Docker-only skip markers and the import-order regression test; the
  underlying issues are fixed in the Isaac Lab beta-2 upgrade.
- Revert test_physics_presets.py to the upgrade-branch version.
- Move the subprocess interpreter lookup into a function in test constants.
- Docs: drop pinned wheel versions, per-test smoke commands, and stale notes;
  run all test phases as the native verification; shorten the README native
  setup to a single commented code block matching the Docker one.

Signed-off-by: alex <amillane@nvidia.com>
…2' into rcathomen/feature/uv-native-install-2

@alexmillane alexmillane left a comment

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.

Self review #2

Comment thread isaaclab_arena/tests/utils/constants.py Outdated
Comment on lines +11 to +16
"""Return the interpreter used to spawn subprocess-based tests.

Docker bundles Isaac Sim's ``python.sh`` under the IsaacLab submodule; the
native uv environment has no such bundle, so fall back to the current
interpreter (the uv venv python, which carries the isaaclab wheel).
"""

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.

First line: Return the Isaac Sim python interpretter.

Later: Docker bundles Isaac Sim's python.sh under the IsaacLab submodule; the native uv environment uses uv-managed python.

Comment thread isaaclab_arena/tests/test_packaging.py Outdated
Comment on lines +29 to +39
DISCOVERABLE_MODULES = (
"isaaclab_arena.evaluation.policy_runner",
"isaaclab_arena.tasks.sequential_composite_tasks.franka_put_and_close_door_task",
)

RUNTIME_RESOURCES = (
"isaaclab_arena/visualization/report_template.html",
"isaaclab_arena_environments/eval_jobs_configs/zero_action_jobs_config.json",
"isaaclab_arena_g1/g1_env/config/loco_manip_g1_joints_order_43dof.yaml",
"isaaclab_arena_gr00t/policy/config/droid_manip_gr00t_closedloop_config.yaml",
)

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.

Remove these.

Comment thread isaaclab_arena/tests/test_packaging.py Outdated
Comment on lines +42 to +46
def _get_repo_root() -> Path:
"""Locate the repo root from the installed ``isaaclab_arena`` package."""
arena_spec = importlib.util.find_spec("isaaclab_arena")
assert arena_spec is not None and arena_spec.origin is not None
return Path(arena_spec.origin).resolve().parent.parent

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.

remove

Comment thread isaaclab_arena/tests/test_packaging.py Outdated
Comment on lines +54 to +62
def test_modules_discoverable():
for module in DISCOVERABLE_MODULES:
assert importlib.util.find_spec(module) is not None, module


def test_runtime_resources_present():
repo_root = _get_repo_root()
for runtime_resource in RUNTIME_RESOURCES:
assert (repo_root / runtime_resource).is_file(), runtime_resource

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.

remove.

Comment thread pyproject.toml Outdated
Comment on lines +38 to +48
# PEP 735 dependency group. `uv sync` installs the default groups automatically
# (so the new-user UX stays `git clone && uv sync && uv run pytest ...` with no
# flags), but pip's `pip install -e .[dev]` path -- which the Docker build uses --
# does NOT read PEP 735 groups. This is the load-bearing reason these pins live
# here and NOT in [project.dependencies]: the Docker image installs IsaacLab from
# the beta-2 submodule (reporting its internal extension version, editable,
# --no-deps) and Isaac Sim from
# the base image; resolving `isaaclab==3.0.0b2` against that editable install
# would force pip to download the public wheel + Isaac Sim (~20 GB) and corrupt
# the staged, ABI-sensitive Newton/MuJoCo setup. Keeping the public wheels in a
# dependency group provides the native uv install without touching docker/.

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.

Shorten this. The basic reason is that these dependencies are needed for the uv install but not the docker install. uv installs dependency groups by default but pip, which is used in the docker, does not.

Comment thread pyproject.toml Outdated
Comment on lines +83 to +92
# Known upstream limitation (deliberately NOT worked around): isaacsim-kernel
# 6.0.0.1 also hard-pins coverage==7.4.4, but every numba that supports numpy
# 2.3.1 (>=0.62) subclasses coverage.types.Tracer, which needs coverage>=7.6 --
# so `import numba` fails here. We do not override coverage to 7.6.x: that would
# re-introduce the metadata inconsistency uv pip check catches and could break
# untested Isaac Sim code. Arena never imports numba (it is only a transitive dep
# of the isaaclab wheel); native in-process smoke tests, whole-suite collection,
# and sensitivity analysis all work without it. numba-backed *upstream* Isaac
# Lab functionality is outside the validated native-uv scope -- use Docker for
# that.

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.

Shorten this comment.

Comment thread pyproject.toml Outdated

[tool.isort]

py_version = 310

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.

is this still true. elsewhere (in .python-version) we specify another python version.

Comment thread README.md Outdated
Comment on lines +87 to +88
# 4. Verify the installation
uv run pytest -sv -m "not with_cameras" isaaclab_arena/tests/

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.

Replace with the zero action run from the rst docs.

Comment thread README.md
Comment on lines 103 to 104
# Or with GR00T dependencies (for policy training/evaluation):
./docker/run_docker.sh -g

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.

remove

Comment thread README.md Outdated
Comment on lines 106 to 107

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.

same comment as above. replace with the zero action runner command from the docs.

The CUDA base image only requests compute,utility from the NVIDIA
container runtime, so the driver's graphics libraries (libGLX_nvidia,
libEGL_nvidia, Vulkan ICD) were never injected. Kit's MDL/Neuray
renderer then failed to load libGL.so.1 and hung indefinitely during
material creation. Request all driver capabilities and install the
GL/Vulkan loader packages that dispatch to the injected driver
libraries (the same set the official Isaac Sim image installs).

Signed-off-by: alex <amillane@nvidia.com>
The Isaac 6.0 asset tree replaced FrankaEmika/panda_instanceable.usd
with a restructured MuJoCo-converted asset (franka_panda.usda with a
different prim layout), which upstream FRANKA_PANDA_CFG has not been
updated for, so spawning the assembly robot failed with a USD-not-found
error in every container. Point the assembly config at the identical
5.0 asset until Isaac Lab catches up.

Signed-off-by: alex <amillane@nvidia.com>
This reverts commit 1483ace.

Signed-off-by: alex <amillane@nvidia.com>
This reverts commit 1215d52.

Signed-off-by: alex <amillane@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants