Skip to content

Commit 4a3d1f3

Browse files
authored
Install AutoData natively as a uv project (#89)
* feat: install AutoData natively as a uv project Add uv project metadata and a uv.lock seeded from Arena's lock, so `uv sync --locked` and `uv run --locked` work on a Linux x86_64 GPU host without a container. Docker remains the recommended installation. - pyproject.toml replaces setup.py and mirrors Arena's resolver settings. - A drift test keeps shared packages at Arena's locked versions and dependencies. A CPU CI job checks the lock; a nightly GPU job runs the native installation. - cuRobo installs with `uv sync --locked --group curobo`. - The docs, AGENTS.md and the dataset-generation skill describe the uv environment. * chore: tighten uv project comments and docs * fix: address review comments on the uv project * fix: address follow-up review comments on the uv project * fix: expose test callbacks to native subprocesses * fix: let the generation helpers find the repo's uv environment * fix: share locked setup and gate native installs * fix: bound native CI cache and clarify fork diagnostics * fix: reuse bundled Isaac Sim with locked Docker dependencies
1 parent 073c393 commit 4a3d1f3

40 files changed

Lines changed: 6320 additions & 225 deletions

‎.dockerignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ submodules/IsaacLab-Arena/submodules/**
1616
**/*.egg-info
1717
**/.pytest_cache
1818
**/.cache
19+
**/.venv
1920
**/_isaac_sim
2021
**/.vscode
2122
**/logs

‎.github/workflows/ci.yml‎

Lines changed: 127 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
push:
99
branches: ["main"]
10+
workflow_dispatch:
1011

1112
# Cancel superseded runs on the same ref.
1213
concurrency:
@@ -15,6 +16,7 @@ concurrency:
1516

1617
permissions:
1718
contents: read
19+
pull-requests: read
1820

1921
jobs:
2022

@@ -49,8 +51,105 @@ jobs:
4951
pip install --no-cache-dir pre-commit==4.6.0
5052
pre-commit run --all-files --show-diff-on-failure --verbose
5153
52-
run_tests:
53-
name: Run tests (GPU, repo Docker)
54+
uv_lock:
55+
name: uv lock
56+
# Needs no GPU, so unlike the GPU job it also runs for fork PRs.
57+
runs-on: ubuntu-24.04
58+
timeout-minutes: 30
59+
60+
steps:
61+
- name: Checkout (recursive submodules)
62+
uses: actions/checkout@v5
63+
with:
64+
submodules: recursive
65+
persist-credentials: false
66+
67+
- name: Install uv
68+
run: |
69+
curl -LsSf https://astral.sh/uv/0.12.21/install.sh | env UV_INSTALL_DIR="${RUNNER_TEMP}/uv" UV_NO_MODIFY_PATH=1 sh
70+
echo "${RUNNER_TEMP}/uv" >> "${GITHUB_PATH}"
71+
72+
- name: Check the lock
73+
run: |
74+
uv lock --locked
75+
uv run --locked --only-group dev pytest autodata_tests/utils/test_uv_lock.py autodata_tests/utils/test_native_ci.py
76+
77+
native_changes:
78+
name: Detect native installation changes
79+
runs-on: ubuntu-24.04
80+
timeout-minutes: 5
81+
outputs:
82+
native: ${{ github.event_name != 'pull_request' || steps.filter.outputs.native == 'true' }}
83+
steps:
84+
# The PR files API compares the full PR, including earlier commits.
85+
- uses: dorny/paths-filter@v3
86+
if: github.event_name == 'pull_request'
87+
id: filter
88+
with:
89+
filters: |
90+
native:
91+
- 'pyproject.toml'
92+
- 'uv.lock'
93+
- 'uv.toml'
94+
- '.python-version'
95+
- '.gitmodules'
96+
- 'submodules/**'
97+
- '.dockerignore'
98+
- 'docker/**'
99+
- '.github/workflows/**'
100+
- 'scripts/**'
101+
- 'skills/**/scripts/**'
102+
- 'sitecustomize.py'
103+
- 'autodata_*/**'
104+
- 'conftest.py'
105+
- 'pytest.ini'
106+
- 'setup.cfg'
107+
108+
native_tests:
109+
name: Native installation
110+
needs: [native_changes, pre_commit]
111+
if: >-
112+
needs.native_changes.outputs.native == 'true' &&
113+
(github.event_name != 'pull_request' ||
114+
github.event.pull_request.head.repo.full_name == github.repository)
115+
uses: ./.github/workflows/native.yml
116+
117+
native_check:
118+
name: Native installation check
119+
runs-on: ubuntu-24.04
120+
timeout-minutes: 5
121+
needs: [native_changes, native_tests]
122+
if: always()
123+
steps:
124+
- name: Check native installation result
125+
env:
126+
CHANGES_RESULT: ${{ needs.native_changes.result }}
127+
NATIVE_REQUIRED: ${{ needs.native_changes.outputs.native }}
128+
NATIVE_RESULT: ${{ needs.native_tests.result }}
129+
TRUSTED: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
130+
run: |
131+
test "${CHANGES_RESULT}" = success
132+
case "${NATIVE_REQUIRED}" in
133+
true)
134+
if [ "${NATIVE_RESULT}" != success ]; then
135+
echo "Native installation tests must succeed; result: ${NATIVE_RESULT}."
136+
if [ "${TRUSTED}" = false ] && [ "${NATIVE_RESULT}" = skipped ]; then
137+
echo "Source/test, dependency/submodule, script, Docker, workflow, or Python/test configuration changes require native GPU testing."
138+
echo "Fork changes must proceed through a maintainer-controlled branch and PR in this repository."
139+
echo "A separate successful run does not unblock the original fork PR."
140+
fi
141+
exit 1
142+
fi
143+
;;
144+
false)
145+
test "${NATIVE_RESULT}" = skipped
146+
echo "No native installation changes."
147+
;;
148+
*) exit 1 ;;
149+
esac
150+
151+
docker_tests:
152+
name: Docker correctness tests (GPU)
54153
runs-on: [self-hosted, gpu]
55154
timeout-minutes: 120
56155
needs: [pre_commit]
@@ -62,6 +161,7 @@ jobs:
62161
# trials each) are heavy and run in the nightly instead. No marker filter, so
63162
# both subprocess and unit tests run.
64163
env:
164+
FORCE_REBUILD: "true"
65165
TEST_PATH: "autodata_tests/e2e/ autodata_tests/interfaces/ autodata_tests/core/ autodata_tests/utils/ autodata_tests/retargeting/ autodata_tests/metrics/"
66166

67167
steps:
@@ -97,6 +197,31 @@ jobs:
97197
mkdir -p "${DOCKER_CONFIG}"
98198
./scripts/ci/run_tests.sh
99199
200+
run_tests:
201+
# Preserve the required check name while gating both installation paths.
202+
name: Run tests (GPU, repo Docker)
203+
runs-on: ubuntu-24.04
204+
timeout-minutes: 5
205+
needs: [pre_commit, uv_lock, native_check, docker_tests]
206+
if: always()
207+
steps:
208+
- name: Check all required test results
209+
env:
210+
PRE_COMMIT_RESULT: ${{ needs.pre_commit.result }}
211+
LOCK_RESULT: ${{ needs.uv_lock.result }}
212+
NATIVE_RESULT: ${{ needs.native_check.result }}
213+
DOCKER_RESULT: ${{ needs.docker_tests.result }}
214+
TRUSTED: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
215+
run: |
216+
test "${PRE_COMMIT_RESULT}" = success
217+
test "${LOCK_RESULT}" = success
218+
test "${NATIVE_RESULT}" = success
219+
if [ "${TRUSTED}" = true ]; then
220+
test "${DOCKER_RESULT}" = success
221+
else
222+
test "${DOCKER_RESULT}" = skipped
223+
fi
224+
100225
build_docs:
101226
name: Build docs
102227
runs-on: ubuntu-24.04

‎.github/workflows/native.yml‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Native uv tests
5+
6+
on:
7+
workflow_call:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: Fresh uv setup and correctness tests (GPU)
15+
runs-on: [self-hosted, gpu]
16+
timeout-minutes: 120
17+
container:
18+
image: nvidia/cuda:12.8.1-devel-ubuntu24.04
19+
options: --gpus all --ipc=host
20+
env:
21+
NVIDIA_DRIVER_CAPABILITIES: all
22+
defaults:
23+
run:
24+
shell: bash
25+
working-directory: native-${{ github.run_id }}-${{ github.run_attempt }}
26+
env:
27+
# This path is in the fresh container, outside the persistent checkout.
28+
UV_PROJECT_ENVIRONMENT: /opt/autodata-venv
29+
UV_PYTHON_INSTALL_DIR: /opt/autodata-python
30+
NATIVE_CACHE_ROOT: ${{ github.workspace }}/../autodata-native-uv-cache
31+
NATIVE_TEMP_SUBDIR: autodata-native-${{ github.run_id }}-${{ github.run_attempt }}
32+
UV_HTTP_TIMEOUT: "300"
33+
CUDA_HOME: /usr/local/cuda-12.8
34+
MAX_JOBS: "4"
35+
OMNI_KIT_ACCEPT_EULA: "YES"
36+
ACCEPT_EULA: "Y"
37+
AUTODATA_SUBPROCESS_TIMEOUT: "1200"
38+
39+
steps:
40+
- name: Install system prerequisites
41+
working-directory: ${{ runner.temp }}
42+
run: |
43+
apt-get update
44+
apt-get install -y --no-install-recommends \
45+
git git-lfs ca-certificates curl cmake build-essential ffmpeg util-linux \
46+
libegl1 libgl1 libglu1-mesa libglib2.0-0t64 libglx0 libxi6 libxrandr2 libxt6 libsm6 libvulkan1
47+
48+
- name: Checkout (recursive submodules and LFS)
49+
uses: actions/checkout@v5
50+
with:
51+
path: native-${{ github.run_id }}-${{ github.run_attempt }}
52+
submodules: recursive
53+
lfs: true
54+
persist-credentials: false
55+
56+
- name: Install uv
57+
run: |
58+
curl -LsSf https://astral.sh/uv/0.12.21/install.sh | env UV_INSTALL_DIR="${RUNNER_TEMP}/${NATIVE_TEMP_SUBDIR}/uv" UV_NO_MODIFY_PATH=1 sh
59+
echo "${RUNNER_TEMP}/${NATIVE_TEMP_SUBDIR}/uv" >> "${GITHUB_PATH}"
60+
echo "${CUDA_HOME}/bin" >> "${GITHUB_PATH}"
61+
62+
- name: Select CUDA build cache
63+
run: |
64+
nvidia-smi
65+
nvcc --version
66+
arch=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | sort -u | paste -sd ';' -)
67+
test -n "${arch}"
68+
echo "TORCH_CUDA_ARCH_LIST=${arch}+PTX" >> "${GITHUB_ENV}"
69+
lock_hash=$(sha256sum uv.lock | cut -d ' ' -f1)
70+
cache_key="uv0.12.21-python3.12-cuda12.8.1-${arch//;/_}-${lock_hash}"
71+
echo "NATIVE_CACHE_KEY=${cache_key}" >> "${GITHUB_ENV}"
72+
echo "cuRobo build cache: ${cache_key}"
73+
74+
- name: Install the locked environment
75+
run: ./scripts/ci/sync_native.sh
76+
77+
- name: Verify CUDA and cuRobo
78+
run: |
79+
uv run --no-sync python - <<'PY'
80+
import sys
81+
import torch
82+
import curobo.geom.sdf.world
83+
84+
print(f"Python: {sys.version} ({sys.executable})")
85+
print(f"Torch: {torch.__version__}, CUDA: {torch.version.cuda}")
86+
assert torch.cuda.is_available(), "CUDA is unavailable"
87+
PY
88+
89+
- name: Run correctness suites including simulator subprocesses
90+
run: |
91+
uv run --no-sync pytest -sv --durations=20 --junitxml="${RUNNER_TEMP}/${NATIVE_TEMP_SUBDIR}/results/junit.xml" \
92+
autodata_tests/e2e/ autodata_tests/interfaces/ autodata_tests/core/ \
93+
autodata_tests/utils/ autodata_tests/retargeting/ autodata_tests/metrics/
94+
95+
- name: Upload test results
96+
if: always()
97+
uses: actions/upload-artifact@v7
98+
with:
99+
name: native-test-results
100+
path: ${{ runner.temp }}/${{ env.NATIVE_TEMP_SUBDIR }}/results/
101+
if-no-files-found: warn
102+
retention-days: 30
103+
104+
- name: Clean up native checkout and temporary files
105+
if: always()
106+
working-directory: ${{ runner.temp }}
107+
env:
108+
NATIVE_CHECKOUT: ${{ github.workspace }}/native-${{ github.run_id }}-${{ github.run_attempt }}
109+
run: rm -rf -- "${NATIVE_CHECKOUT}" "${RUNNER_TEMP}/${NATIVE_TEMP_SUBDIR}"

‎.github/workflows/nightly.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ jobs:
8282
if-no-files-found: warn
8383
retention-days: 30
8484

85+
test_native:
86+
name: Native uv install (GPU)
87+
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
88+
uses: ./.github/workflows/native.yml
89+
8590
publish_docs:
8691
name: Publish docs (GitHub Pages)
8792
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')

‎AGENTS.md‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ This file provides guidance to AI coding agents (Claude Code, OpenAI Codex, etc.
44

55
## Environment
66

7-
All scripts and commands from this repo must be run inside a Docker container started with
8-
`./docker/run_docker.sh` (or `./docker/run_docker.sh -c` for cuRobo). Users must start the container manually; if
9-
no container started by the appropriate command exists, prompt the user to start it.
7+
Run all scripts and commands from this repo in one of these environments:
8+
9+
- The Docker container started with `./docker/run_docker.sh` (or `./docker/run_docker.sh -c` for cuRobo). Users must
10+
start the container manually; if no container started by the appropriate command exists, prompt the user to start
11+
it.
12+
- The repo's uv environment on the host, created by the user with `uv sync --locked` (with `--group curobo` for
13+
SkillGen). Run commands from the repo root as `uv run --no-sync ...`. If `.venv` does not exist, prompt the user to
14+
run `uv sync --locked`.
1015

1116
## Common Commands
1217

@@ -39,5 +44,8 @@ pre-commit run --all-files
3944

4045
- Do not change or modify anything in the submodules. All git-related operations in submodules are read-only: do not commit or push code or create branches in a submodule.
4146
- Don't mutate the `autodata` conda env. No `pip install/uninstall`, `conda install/remove`, or version upgrades. If a dependency is missing, surface the exact command and let the user run it.
47+
- Don't change `uv.lock` or the uv environment. No `uv sync`, `uv add`, `uv remove`, `uv lock --upgrade`, or
48+
`uv pip install`; `uv run --no-sync` changes neither. If a dependency is missing, surface the
49+
exact command and let the user run it.
4250
- Don't re-run, modify, or work around `conda_installer.sh`. No env recreate/rename/delete, no channel or conda config changes. Installer issues get reported, not patched in-flight.
4351
- Don't change any existing design docs or diagrams in /docs, that is only for human created files. If you need to add any new diagrams or designs, add them to the /agentic_design directory.

‎README.md‎

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ the amount of manual collection needed to produce datasets for policy training.
6262

6363
- Linux with an NVIDIA GPU and driver that meet the
6464
[Isaac Sim requirements](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/requirements.html)
65-
- [Docker](https://docs.docker.com/engine/install/) and the
66-
[NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
6765
- Git and [Git LFS](https://git-lfs.com/)
68-
- An [NGC](https://catalog.ngc.nvidia.com/) account for the Isaac Sim container image
66+
- For the recommended Docker installation: [Docker](https://docs.docker.com/engine/install/), the
67+
[NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html),
68+
and an [NGC](https://catalog.ngc.nvidia.com/) account for the Isaac Sim container image
69+
- For the native installation instead: Linux x86_64,
70+
[uv](https://docs.astral.sh/uv/getting-started/installation/) 0.12.21 or newer, CMake, and a C++ compiler
6971

7072
### Installation
7173

@@ -87,25 +89,34 @@ docker login nvcr.io
8789

8890
The first launch builds the development image and opens a shell in the repository at
8991
`/workspaces/autodata`. Subsequent launches reuse the image. Use `./docker/run_docker.sh -c` to include cuRobo
90-
for SkillGen workflows.
92+
for SkillGen workflows. Docker reuses the base image's Isaac Sim; other dependencies use the same repository
93+
`uv.lock` as the native installation.
9194

92-
This checkout uses Isaac Sim 6.1.0, Arena 0.3.1 at commit
93-
`481f5ae5f19df7bc5d24a17240fc0d96ac81eaf7`, and its nested Isaac Lab at commit
94-
`28a386f063e41c04c07f50e63eefb83fd8408fbe` (v3.0.0-EA plus 3 commits). After updating an existing clone, run
95-
`git submodule update --init --recursive` and rebuild with `./docker/run_docker.sh -c -r`.
95+
For the native installation, skip Docker and install the locked environment at the repository root instead:
96+
97+
```bash
98+
uv sync --locked
99+
```
100+
101+
This checkout uses Isaac Sim 6.1.0, Arena 0.3.0 at commit
102+
`c7edf3a9d5d8276565208f72422f8f8a0806d6cf`, and its nested Isaac Lab at commit
103+
`91a0906f93802eb859192dcb0bca879f891e92d6`. After updating an existing clone, run
104+
`git submodule update --init --recursive` and rebuild with `./docker/run_docker.sh -c -r`, or rerun
105+
`uv sync --locked` for the native installation.
96106
Commands, environment profiles, and source dataset metadata use Lab 3.0's `IsaacContrib-*`
97107
task names directly. For example, Franka recording uses
98108
`--task IsaacContrib-Stack-Cube-Franka-IK-Rel`.
99109

100-
Docker is recommended. For a native Python 3.12 environment, the updated
101-
`./conda_installer.sh -c -i` installs the Sim/Lab stack from Arena's lockfile; see the
102-
[installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-conda-installation).
103-
Additional container options are described in the
104-
[installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html).
110+
The [installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html) covers the
111+
[native uv installation](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-native-uv-installation)
112+
including cuRobo, a
113+
[conda installation](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-conda-installation)
114+
with `./conda_installer.sh -c -i`, and additional container options.
105115

106116
### Generate Your First Dataset
107117

108-
Inside the container, generate ten Franka cube-stacking demonstrations from the pre-annotated dataset:
118+
Inside the container, generate ten Franka cube-stacking demonstrations from the pre-annotated dataset. In the uv
119+
environment, start each Python command with `uv run --locked`:
109120

110121
```bash
111122
python scripts/generate_dataset.py \

‎autodata_interfaces/motion_planners/curobo/plan_visualizer.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ def __init__(
150150
self._rerun_process = rr.spawn()
151151
except Exception as exc:
152152
raise RuntimeError(
153-
"Failed to spawn the Rerun viewer. Ensure the `rerun` executable is installed "
154-
"and available on PATH; Isaac Sim installs it under /isaac-sim/kit/python/bin."
153+
"Failed to spawn the Rerun viewer. Ensure the `rerun` executable from the rerun-sdk "
154+
"package is on PATH, for example in the Python environment's bin directory."
155155
) from exc
156156

157157
# Set up coordinate system

0 commit comments

Comments
 (0)