Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
# Needs no GPU, so unlike the GPU job 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
48 changes: 48 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,54 @@ 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
lfs: true
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: 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 --no-sync ...`. 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 --no-sync` changes neither. 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.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ the amount of manual collection needed to produce datasets for policy training.

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

### Installation

Expand All @@ -89,23 +91,31 @@ The first launch builds the development image and opens a shell in the repositor
`/workspaces/autodata`. Subsequent launches reuse the image. Use `./docker/run_docker.sh -c` to include cuRobo
for SkillGen workflows.

For the native installation, skip Docker and install the locked environment at the repository root instead:

```bash
uv sync --locked
```

This checkout uses Isaac Sim 6.1.0, Arena 0.3.1 at commit
`481f5ae5f19df7bc5d24a17240fc0d96ac81eaf7`, and its nested Isaac Lab at commit
`28a386f063e41c04c07f50e63eefb83fd8408fbe` (v3.0.0-EA plus 3 commits). After updating an existing clone, run
`git submodule update --init --recursive` and rebuild with `./docker/run_docker.sh -c -r`.
`git submodule update --init --recursive` and rebuild with `./docker/run_docker.sh -c -r`, or rerun
`uv sync --locked` for the native installation.
Commands, environment profiles, and source dataset metadata use Lab 3.0's `IsaacContrib-*`
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).
Additional container options are described in the
[installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html).
The [installation guide](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html) covers the
[native uv installation](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-native-uv-installation)
including cuRobo, a
[conda installation](https://isaac-sim.github.io/AutoData/main/pages/quickstart/installation.html#optional-conda-installation)
with `./conda_installer.sh -c -i`, and additional container options.

### 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 each Python command with `uv run --locked`:

```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
50 changes: 50 additions & 0 deletions autodata_tests/utils/test_uv_lock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 collections import defaultdict
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, list]:
# A lock can hold several records of one package, one per resolution fork. Dependency markers are left out:
# uv writes equivalent markers differently depending on the root project.
records = defaultdict(list)
for package in _load(lock)["package"]:
dependencies = sorted(
(dependency["name"], dependency.get("version", ""), dependency.get("extra", []))
for dependency in package.get("dependencies", [])
)
records[package["name"]].append((package.get("version", ""), dependencies))
return {name: sorted(entries) for name, entries in records.items()}


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 deprecates Arena's prerelease mode; if-necessary resolves 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
Loading
Loading