Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ jobs:
pip install --no-cache-dir pre-commit==4.6.0
pre-commit run --all-files --show-diff-on-failure --verbose

uv_lock:
name: uv lock
# Checks that uv.lock matches pyproject.toml and Arena's lock. Needs no GPU, so it also runs for fork PRs.
runs-on: ubuntu-24.04
timeout-minutes: 30

steps:
- name: Checkout (recursive submodules)
uses: actions/checkout@v5
with:
submodules: recursive
persist-credentials: false

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/0.12.21/install.sh | env UV_INSTALL_DIR="${RUNNER_TEMP}/uv" UV_NO_MODIFY_PATH=1 sh
echo "${RUNNER_TEMP}/uv" >> "${GITHUB_PATH}"

- name: Check the lock
run: |
uv lock --locked
uv run --locked --only-group dev pytest autodata_tests/utils/test_uv_lock.py

Comment thread
bokalnv marked this conversation as resolved.
Resolved
run_tests:
name: Run tests (GPU, repo Docker)
runs-on: [self-hosted, gpu]
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,57 @@ jobs:
if-no-files-found: warn
retention-days: 30

test_native:
name: Native uv install (GPU)
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
runs-on: [self-hosted, gpu]
timeout-minutes: 120

env:
# A persistent cache on the workspace filesystem lets uv hard-link the environment instead of
# downloading and copying about 25 GB on every run.
UV_CACHE_DIR: ${{ github.workspace }}/../uv-cache
OMNI_KIT_ACCEPT_EULA: "YES"
ACCEPT_EULA: "Y"

steps:
- name: nvidia-smi
run: nvidia-smi

- name: Clean up submodules directory
run: |
rm -f .git/modules/submodules/IsaacLab-Arena/index.lock || true
rm -rf submodules/* || true

- name: Mark repo as safe for git
run: git config --global --add safe.directory "$PWD"

- name: Checkout (recursive submodules)
uses: actions/checkout@v5
with:
submodules: recursive
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

- name: Pull LFS test data
run: |
git lfs install --local
git lfs pull

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/0.12.21/install.sh | env UV_INSTALL_DIR="${RUNNER_TEMP}/uv" UV_NO_MODIFY_PATH=1 sh
echo "${RUNNER_TEMP}/uv" >> "${GITHUB_PATH}"

- name: Install the locked environment
run: uv sync --locked

- name: Run unit tests
run: uv run --locked pytest -sv autodata_tests -m "not with_subprocess"

- name: Run Franka MimicGen generation
run: >-
uv run --locked pytest -sv
autodata_tests/e2e/test_mimicgen_data_generation.py::test_franka_cube_stack_mimicgen_data_generation_single_env_cuda

publish_docs:
name: Publish docs (GitHub Pages)
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
Expand Down
14 changes: 11 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ This file provides guidance to AI coding agents (Claude Code, OpenAI Codex, etc.

## Environment

All scripts and commands from this repo must be run inside a Docker container started with
`./docker/run_docker.sh` (or `./docker/run_docker.sh -c` for cuRobo). Users must start the container manually; if
no container started by the appropriate command exists, prompt the user to start it.
Run all scripts and commands from this repo in one of these environments:

- The Docker container started with `./docker/run_docker.sh` (or `./docker/run_docker.sh -c` for cuRobo). Users must
start the container manually; if no container started by the appropriate command exists, prompt the user to start
it.
- The repo's uv environment on the host, created by the user with `uv sync --locked` (with `--group curobo` for
SkillGen). Run commands from the repo root as `uv run --locked ...`. If `.venv` does not exist, prompt the user to
run `uv sync --locked`.

## Common Commands

Expand Down Expand Up @@ -39,5 +44,8 @@ pre-commit run --all-files

- 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.
- 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.
- Don't change `uv.lock` or the uv environment. No `uv sync`, `uv add`, `uv remove`, `uv lock --upgrade`, or
`uv pip install`; `uv run --locked` fails instead of rewriting the lock. If a dependency is missing, surface the
exact command and let the user run it.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- 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.
- 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.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,18 @@ Commands, environment profiles, and source dataset metadata use Lab 3.0's `Isaac
task names directly. For example, Franka recording uses
`--task IsaacContrib-Stack-Cube-Franka-IK-Rel`.

Docker is recommended. For a native Python 3.12 environment, the updated
`./conda_installer.sh -c -i` installs the Sim/Lab stack from Arena's lockfile; see the
[installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-conda-installation).
Docker is recommended. For a native environment on Linux x86_64, `uv sync --locked` installs the Sim/Lab stack
from the repository's `uv.lock`, and `uv run --locked` runs commands in it; see the
[native uv installation](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-native-uv-installation).
For a conda environment, `./conda_installer.sh -c -i` installs the same stack from Arena's lockfile; see the
[conda installation](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-conda-installation).
Additional container options are described in the
[installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html).

### Generate Your First Dataset

Inside the container, generate ten Franka cube-stacking demonstrations from the pre-annotated dataset:
Inside the container, generate ten Franka cube-stacking demonstrations from the pre-annotated dataset. In the uv
environment, start the command with `uv run --locked`:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

```bash
python scripts/generate_dataset.py \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def __init__(
self._rerun_process = rr.spawn()
except Exception as exc:
raise RuntimeError(
"Failed to spawn the Rerun viewer. Ensure the `rerun` executable is installed "
"and available on PATH; Isaac Sim installs it under /isaac-sim/kit/python/bin."
"Failed to spawn the Rerun viewer. Ensure the `rerun` executable from the rerun-sdk "
"package is on PATH, for example in the Python environment's bin directory."
) from exc

# Set up coordinate system
Expand Down
7 changes: 6 additions & 1 deletion autodata_tests/e2e/test_recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ def test_lab_record_demos_task_startup(tmp_path):
"--external_callback",
"autodata_tests.e2e.test_recording.configure_recording_smoke",
],
env={**os.environ, "HEADLESS": "1"},
# The recorder imports its callback from this test module, which is not an installed package.
env={
**os.environ,
"HEADLESS": "1",
"PYTHONPATH": os.pathsep.join(filter(None, [TestPaths.repo_root, os.environ.get("PYTHONPATH")])),
},
)
with h5py.File(output_file, "r") as dataset:
assert json.loads(dataset["data"].attrs["env_args"])["env_name"] == "IsaacContrib-Stack-Cube-Franka-IK-Rel"
Expand Down
46 changes: 46 additions & 0 deletions autodata_tests/utils/test_uv_lock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""AutoData's uv lock must keep the stack that Arena's lock validated."""

import tomllib
from pathlib import Path

from autodata_tests.utils.constants import TestPaths

ROOT = Path(TestPaths.repo_root)
ARENA = ROOT / "submodules/IsaacLab-Arena"
RESEED = "cp submodules/IsaacLab-Arena/uv.lock uv.lock && uv lock"


def _load(path: Path) -> dict:
return tomllib.loads(path.read_text())


def _resolution(lock: Path) -> dict[str, tuple[str | None, list[str]]]:
return {
package["name"]: (
package.get("version"),
sorted({dependency["name"] for dependency in package.get("dependencies", [])}),
)
for package in _load(lock)["package"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}


def test_shared_packages_keep_arena_resolution():
autodata = _resolution(ROOT / "uv.lock")
arena = _resolution(ARENA / "uv.lock")
drift = {
name: (arena[name], autodata[name]) for name in arena.keys() & autodata.keys() if arena[name] != autodata[name]
}
assert not drift, f"Run `{RESEED}` with the uv version pinned in CI. Arena vs AutoData: {drift}"


def test_resolver_settings_mirror_arena():
autodata = _load(ROOT / "pyproject.toml")["tool"]["uv"]
arena = _load(ARENA / "pyproject.toml")["tool"]["uv"]
# uv deprecated Arena's prerelease mode in favor of if-necessary, which locks this stack identically.
if arena["prerelease"] == "if-necessary-or-explicit":
arena["prerelease"] = "if-necessary"
for key in ("environments", "prerelease", "index-strategy", "override-dependencies", "constraint-dependencies"):
assert autodata[key] == arena[key], f"[tool.uv] {key} differs from Arena's"
2 changes: 1 addition & 1 deletion docker/Dockerfile.autodata
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RUN if [ "$INSTALL_CUROBO" = "true" ]; then \
# AutoData
Comment thread
bokalnv marked this conversation as resolved.
Resolved
##################
# Keep application changes after cuRobo so they do not rebuild its CUDA kernels.
COPY setup.py pyproject.toml README.md sitecustomize.py ${WORKDIR}/
COPY pyproject.toml README.md sitecustomize.py ${WORKDIR}/
COPY autodata_core ${WORKDIR}/autodata_core
COPY autodata_interfaces ${WORKDIR}/autodata_interfaces
COPY autodata_utils ${WORKDIR}/autodata_utils
Expand Down
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

import os
import sys
import tomllib

# TODO: Get this programmatically from setup.py (AUTODATA_VERSION_NUMBER).
AUTODATA_VERSION_NUMBER = "0.1"
with open(os.path.join(os.path.dirname(__file__), "..", "pyproject.toml"), "rb") as pyproject:
AUTODATA_VERSION_NUMBER = tomllib.load(pyproject)["project"]["version"]

# -- Project information -----------------------------------------------------

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/advanced/testing_and_ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Testing and CI
Test Suite
----------

The test suite lives in ``autodata_tests/`` and runs inside the dev container. It is
The test suite lives in ``autodata_tests/`` and runs inside the dev container, or in the native uv
environment with ``uv run --locked pytest``. It is
organized in tiers of increasing cost:

.. list-table::
Expand Down Expand Up @@ -46,8 +47,8 @@ Common invocations:

.. note::

The SkillGen end-to-end tests require the cuRobo image
(``./docker/run_docker.sh -c``).
The SkillGen end-to-end tests require cuRobo: the cuRobo image (``./docker/run_docker.sh -c``)
or the uv ``curobo`` group described in :doc:`../quickstart/installation`.

Debugging Isaac Sim Runs
------------------------
Expand Down Expand Up @@ -81,7 +82,8 @@ Linting
-------

Pre-commit hooks enforce the style guide (black, flake8, isort, pyupgrade, codespell, and
RST checks). Run them inside the development container before committing:
RST checks). Run them before committing, inside the development container or with
``uv run --locked pre-commit run --all-files`` in the uv environment:

.. code-block:: bash

Expand Down
5 changes: 4 additions & 1 deletion docs/pages/quickstart/first_data_generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Prerequisites
-------------

* Installation is complete — repo cloned with submodules, NGC login, Docker with the NVIDIA
Container Toolkit (see :doc:`installation`).
Container Toolkit, or the optional native uv environment (see :doc:`installation`).
* Git LFS data is pulled — the source dataset lives at
``./datasets/annotated_datasets`` in the repository (``/workspaces/autodata/datasets/annotated_datasets``
inside the container).
Expand All @@ -30,6 +30,9 @@ It will take a few minutes to build the container the first time you run it.
Once built, the script will automatically drop you into a shell at ``/workspaces/autodata``
inside the container. All following commands are run from there.

In the native uv environment, skip the container. Run the following commands from the repository root
and start each Python command with ``uv run --locked``.

Generate a Dataset
------------------

Expand Down
73 changes: 70 additions & 3 deletions docs/pages/quickstart/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ without modifying the host Python installation. The repository is bind-mounted i
so edits on the host are live inside it.

This checkout uses Isaac Sim 6.1.0, Isaac Lab 3.0.0, and Arena 0.3.0.
Use the pinned Docker environment or the optional conda installation below for the workflows on this site.
Use the pinned Docker environment or one of the optional native installations below for the workflows on this
site.

Before installing, review the :doc:`support_matrix` for the complete supported software stack,
hardware requirements, optional cuRobo and XR dependencies, and resource guidance.
Expand Down Expand Up @@ -134,6 +135,71 @@ The checked-in example datasets are under ``./datasets/`` relative to the reposi
dataset directory.


Optional Native uv Installation
-------------------------------

AutoData is a `uv <https://docs.astral.sh/uv/>`__ project. ``uv sync`` installs Isaac Sim **6.1.0.0** (the pip
version of Sim 6.1.0), PyTorch **2.11.0+cu128**, Isaac Lab, Arena, and AutoData with its test tools into ``.venv``
at the repository root. The versions come from the repository's ``uv.lock``, which keeps Arena's locked version of
every package they share. Lab, Arena, and AutoData are editable installations from the checkout, and uv provides Python 3.12.

The uv installation supports Linux x86_64. On the host, install
`uv <https://docs.astral.sh/uv/getting-started/installation/>`__ **0.12.21 or newer**, Git, CMake, and a C++
compiler. The environment needs about 35 GB of disk space. On Ubuntu:

.. code-block:: bash

sudo apt-get install build-essential cmake git git-lfs

After cloning the repository and pulling the LFS datasets, run this command at the repository root:

.. code-block:: bash

uv sync --locked

Run workflow commands from the repository root, starting each one with ``uv run --locked``. For example:

.. code-block:: bash

export OMNI_KIT_ACCEPT_EULA=YES ACCEPT_EULA=Y
uv run --locked python scripts/generate_dataset.py --help

``--locked`` stops with an error instead of changing ``uv.lock``. Substitute the repository root for the
Docker-only ``/workspaces/autodata`` path. After updating the checkout and its submodules, run
``uv sync --locked`` again.

Review and accept the Isaac Sim EULA on first launch. For unattended launches after accepting it, set
the two variables shown above. ``uv pip check`` reports the discrepancies listed for the conda installation
below, except ``openpi-client``, which this environment does not install. Arena's ``packaging`` override also
leaves ``virtualenv`` (used by ``pre-commit``) and ``vcs-versioning`` (used to build cuRobo) below the
``packaging`` version they declare. Both work with the locked version.


.. _installation-uv-curobo:

Optional cuRobo for uv
^^^^^^^^^^^^^^^^^^^^^^

SkillGen additionally needs cuRobo and a **CUDA Toolkit 12.8** installation containing ``nvcc``. cuRobo
compiles CUDA kernels for the GPU's compute capability against the environment's PyTorch. Install the toolkit
using NVIDIA's `CUDA installation guide <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/>`__, then run
the following at the repository root. Adjust ``CUDA_HOME`` if your toolkit is installed elsewhere:

.. code-block:: bash

export CUDA_HOME=/usr/local/cuda-12.8
export PATH="$CUDA_HOME/bin:$PATH"
export TORCH_CUDA_ARCH_LIST="$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | head -n1)+PTX"
export MAX_JOBS=4
uv cache clean nvidia-curobo
uv sync --locked --group curobo
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

uv reuses a cached cuRobo build regardless of the GPU or PyTorch version. ``uv cache clean nvidia-curobo``
makes the sync rebuild it, so run these commands again after changing the GPU or the PyTorch version in
``uv.lock``. To keep cuRobo, pass ``--group curobo`` to later ``uv sync`` commands. ``uv run`` keeps it either
way.


Optional Conda Installation
---------------------------

Expand Down Expand Up @@ -258,8 +324,9 @@ See :autodata_code_link:`<docs/README.md>` for local build instructions.
Verifying the Installation
--------------------------

Run these commands from the repository root in the activated conda environment, or from
``/workspaces/autodata`` inside the container. The full suite includes SkillGen tests and requires cuRobo.
Run these commands from the repository root in the activated conda environment, or start them with
``uv run --locked`` in the uv environment. Inside the container, run them from ``/workspaces/autodata``.
The full suite includes SkillGen tests and requires cuRobo.

Run the fast unit tests (a few seconds, no Isaac Sim launch):

Expand Down
5 changes: 4 additions & 1 deletion docs/pages/quickstart/support_matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ Isaac Lab or Isaac Lab-Arena revisions.
- Minimum: 100 GB SSD. Recommended: 500 GB SSD
* - Docker installation
- Docker Engine with the NVIDIA Container Toolkit; recommended AutoData installation
* - uv installation
- Optional: Linux x86_64, uv >= 0.12.21, CMake, and a C++ compiler; ``uv sync --locked`` installs
the repository's ``uv.lock``. See :doc:`installation`.
* - Conda installation
- Optional: Python 3.12, conda, uv >= 0.12.21, CMake, and a C++ compiler;
``conda_installer.sh`` installs Arena's locked environment. See :doc:`installation`.
* - Isaac Sim
- ``nvcr.io/nvidia/isaac-sim:6.1.0`` (Docker) or ``isaacsim==6.1.0.0`` (conda/pip)
- ``nvcr.io/nvidia/isaac-sim:6.1.0`` (Docker) or ``isaacsim==6.1.0.0`` (uv, conda, or pip)
* - Isaac Lab
- 3.0.0 at commit ``28a386f063e41c04c07f50e63eefb83fd8408fbe``
* - Isaac Lab-Arena
Expand Down
Loading
Loading