Project Setup (Python)
When to Use
Use this skill when the user asks to create a new Python project, set up ovrtx in Python, create a pyproject.toml, or scaffold a Python app.
Inputs
Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.
- Project language, package manager, build system, and target platform from the user request.
- Whether the project should use packaged ovrtx or the local dev-mode build.
- Repository source snippets and example projects referenced below. Treat these snippets as the API source of truth.
Prerequisites
- Use an ovrtx checkout that contains the referenced examples and docs tests.
- Confirm Python, CMake, compiler, and package-index requirements before giving setup commands.
- Avoid modifying tracked dependency files unless the user explicitly asks for project scaffolding changes.
Instructions
- Identify the requested project type, platform, package source, and expected run command.
- Read the minimal example and setup snippets before writing scaffolding.
- Use the repository's existing Python or CMake conventions instead of inventing a new layout.
- Include renderer creation and first-frame validation only after the project dependency setup is complete.
- When changing code, run the narrow example setup or docs test whenever practical.
Output Format
- For explanations, cite the relevant API names, source snippets, and caveats.
- For code changes, summarize the files changed, snippets affected, and validation run.
Scripts
This skill has no scripts.
Limitations
- The referenced snippets remain the source of truth; update or add tested snippets before documenting new API usage.
Overview
ovrtx and ovstage are distributed as Python packages on PyPI. Use uv when you want project and dependency management. This skill scaffolds the current attached-stage workflow with both packages. ovstage remains optional for standalone compatibility code.
Project Structure
my-ovrtx-app/
pyproject.toml
main.py
Setup with uv (Recommended)
mkdir my-ovrtx-app && cd my-ovrtx-app
uv init
uv add ovrtx ovstage
This creates a pyproject.toml and uv.lock. Then add numpy (required for array/tensor operations):
uv add numpy
The resulting pyproject.toml will look like:
[project]
name = "my-ovrtx-app"
version = "0.1.0"
requires-python = ">=3.10,<3.14"
dependencies = [
"ovrtx",
"ovstage",
"numpy",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Adding optional dependencies
For image output:
uv add pillow
For GPU compute with Warp:
uv add warp-lang
For visualization with rerun:
uv add rerun-sdk
Setup with pip
pip install ovrtx ovstage
Minimal main.py
Source: examples/python/minimal/main.py snippet create-renderer
Source (continued): examples/python/minimal/main.py snippet add-usd
Source (continued): examples/python/minimal/main.py snippet step
Source (continued): examples/python/minimal/main.py snippet read-render-output
ovrtx and ovstage Load Order
Importing the modules does not load either OpenUSD-dependent runtime. Two flows
are supported:
- Renderer first (the minimal example):
ovrtx.Renderer() opens the ovrtx
shared loader, registers schema paths, and loads the ovrtx runtime/OpenUSD.
ovstage.Stage() then opens the ovstage shared loader and loads the ovstage
runtime against that initialized OpenUSD.
- Stage first: call
ovrtx.register_schema_paths() before constructing the
first ovstage.Stage. Registration opens only the ovrtx shared loader and
publishes discovery paths. Stage construction then loads the ovstage runtime
and OpenUSD; later ovrtx.Renderer() loads the ovrtx runtime with the paths
already fixed.
Treat ovstage.library_version() as ovstage initialization for ordering
purposes because its version probe creates a temporary native instance. The
schema call must precede it in a stage-first process.
Run
uv run main.py --png
# or with pip-installed ovrtx and ovstage:
python main.py --png
A successful run writes _output/render.png. The output should match the documented minimal reference image.
Key Dependencies
| Package |
Purpose |
ovrtx |
Core renderer |
ovstage |
Runtime scene ownership for attached rendering |
pillow |
Image I/O (PNG, JPEG) |
numpy |
Array manipulation, DLPack interop |
warp-lang |
GPU compute kernels |
rerun-sdk |
Real-time visualization |
Troubleshooting
- If
uv is missing (uv: command not found), install uv before using the recommended setup commands, or translate the dependency steps to an equivalent pip/virtualenv workflow. PyPI is still the package source.
- ovrtx supports Python 3.10-3.13. If install resolution fails, no matching wheel is found, or imports fail on another Python version, recreate the environment with a supported interpreter (
uv python install 3.13 and uv python pin 3.13, or a virtualenv using Python 3.10-3.13). Do not work around unsupported interpreters by editing ovrtx dependency constraints.
- If package installation fails (
uv add ovrtx ovstage or pip install ovrtx ovstage for attached mode), classify the failure before treating it as an ovrtx issue: resolver or no matching distribution errors usually indicate an unsupported Python version or platform; connection, TLS, timeout, or index errors usually indicate PyPI/network/proxy access; wheel download or install errors may require checking the target platform tag. PyPI is the recommended package source. GitHub Releases contain Python wheels for explicit release-artifact installs, not normal consumption. Do not edit ovrtx constraints to force unsupported interpreters or platforms. If both PyPI and an explicit release wheel fail, report the exact Python version, OS/architecture, platform tag, command, and full error.
- If
pytest fails before test assertions because ovrtx cannot load libovrtx-dynamic.so, ovrtx-dynamic.dll, or required runtime directories, classify it as a package/runtime layout issue rather than a test failure. If pytest reaches runtime validation and fails because the host lacks an RTX GPU, a supported driver, unsandboxed execution, or internet access for remote S3 assets, report the missing prerequisite explicitly. Do not treat import-only, docs-only, or prerequisite-blocked pytest runs as successful runtime validation.
- ovrtx runtime validation requires an NVIDIA RTX-capable GPU and a supported NVIDIA driver. If no RTX GPU is visible, rerun validation outside the sandbox. If no RTX GPU is still visible, stop runtime validation and tell the user they need an RTX GPU.
- Supported NVIDIA driver versions are listed in
docs/driver_requirements.rst. Use that page as the ovrtx source of truth for runtime validation. If driver detection fails, the driver is inaccessible, or the detected version is older than the listed baseline for the host OS, GPU generation, and GPU type, rerun validation outside the sandbox. If the driver is still missing or incompatible, stop runtime validation and tell the user they need a supported NVIDIA driver.
- Run ovrtx-related runtime code outside sandboxed environments.
- Examples that load remote S3 assets require internet access.
- The first step from a newly built application will block for 1-2 minutes while shaders are compiled and cached. Wait at least 5 minutes before treating this as a failure.
- USD files can be loaded from local paths,
file:// URIs, or https:// URLs.
Standalone Compatibility (ovrtx 0.4)
The scaffold above follows the current attached-stage workflow. ovstage can be
omitted when maintaining standalone compatibility code, but the renderer-owned
scene APIs used by that mode are deprecated as scene ownership transitions
entirely to ovstage in a future release:
dependencies = [
"ovrtx>=0.4",
"ovstage>=0.1",
]
See docs/core/ovstage_integration.rst for the attached-mode overview.
References
- Use the
> **Source:** directives in this skill to locate tested snippets before reusing API patterns.
- Keep related skills, docs, and snippets synchronized when changing the workflow.
1---2# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.3# SPDX-License-Identifier: LicenseRef-NvidiaProprietary4#5# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual6# property and proprietary rights in and to this material, related7# documentation and any modifications thereto. Any use, reproduction,8# disclosure or distribution of this material and related documentation9# without an express license agreement from NVIDIA CORPORATION or10# its affiliates is strictly prohibited.11name: project-setup-python12description: >13 Setting up a new Python project that uses ovrtx. Use when user asks to create a new14 Python project, set up ovrtx in Python, create a pyproject.toml, or scaffold a Python15 app.16license: LicenseRef-NvidiaProprietary17author: NVIDIA ovrtx18tags:19 - ovrtx20 - python21 - setup22tools:23 - Read24 - Grep25 - Shell26 - Write27---2829# Project Setup (Python)3031## When to Use3233Use this skill when the user asks to create a new Python project, set up ovrtx in Python, create a pyproject.toml, or scaffold a Python app.3435## Inputs3637Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.3839- Project language, package manager, build system, and target platform from the user request.40- Whether the project should use packaged ovrtx or the local dev-mode build.41- Repository source snippets and example projects referenced below. Treat these snippets as the API source of truth.4243## Prerequisites4445- Use an ovrtx checkout that contains the referenced examples and docs tests.46- Confirm Python, CMake, compiler, and package-index requirements before giving setup commands.47- Avoid modifying tracked dependency files unless the user explicitly asks for project scaffolding changes.4849## Instructions50511. Identify the requested project type, platform, package source, and expected run command.522. Read the minimal example and setup snippets before writing scaffolding.533. Use the repository's existing Python or CMake conventions instead of inventing a new layout.544. Include renderer creation and first-frame validation only after the project dependency setup is complete.555. When changing code, run the narrow example setup or docs test whenever practical.5657## Output Format5859- For explanations, cite the relevant API names, source snippets, and caveats.60- For code changes, summarize the files changed, snippets affected, and validation run.6162## Scripts6364This skill has no scripts.6566## Limitations6768- The referenced snippets remain the source of truth; update or add tested snippets before documenting new API usage.6970## Overview7172ovrtx and ovstage are distributed as Python packages on PyPI. Use `uv` when you want project and dependency management. This skill scaffolds the current attached-stage workflow with both packages. ovstage remains optional for standalone compatibility code.7374## Project Structure7576```77my-ovrtx-app/78 pyproject.toml79 main.py80```8182## Setup with uv (Recommended)8384```bash85mkdir my-ovrtx-app && cd my-ovrtx-app86uv init87uv add ovrtx ovstage88```8990This creates a `pyproject.toml` and `uv.lock`. Then add `numpy` (required for array/tensor operations):9192```bash93uv add numpy94```9596The resulting `pyproject.toml` will look like:9798```toml99[project]100name = "my-ovrtx-app"101version = "0.1.0"102requires-python = ">=3.10,<3.14"103dependencies = [104 "ovrtx",105 "ovstage",106 "numpy",107]108109[build-system]110requires = ["hatchling"]111build-backend = "hatchling.build"112```113114### Adding optional dependencies115116For image output:117118```bash119uv add pillow120```121122For GPU compute with Warp:123124```bash125uv add warp-lang126```127128For visualization with rerun:129130```bash131uv add rerun-sdk132```133134## Setup with pip135136```bash137pip install ovrtx ovstage138```139140## Minimal main.py141142> **Source:** `examples/python/minimal/main.py` snippet `create-renderer`143>144> **Source (continued):** `examples/python/minimal/main.py` snippet `add-usd`145>146> **Source (continued):** `examples/python/minimal/main.py` snippet `step`147>148> **Source (continued):** `examples/python/minimal/main.py` snippet `read-render-output`149150## ovrtx and ovstage Load Order151152Importing the modules does not load either OpenUSD-dependent runtime. Two flows153are supported:154155- **Renderer first (the minimal example):** `ovrtx.Renderer()` opens the ovrtx156 shared loader, registers schema paths, and loads the ovrtx runtime/OpenUSD.157 `ovstage.Stage()` then opens the ovstage shared loader and loads the ovstage158 runtime against that initialized OpenUSD.159- **Stage first:** call `ovrtx.register_schema_paths()` before constructing the160 first `ovstage.Stage`. Registration opens only the ovrtx shared loader and161 publishes discovery paths. Stage construction then loads the ovstage runtime162 and OpenUSD; later `ovrtx.Renderer()` loads the ovrtx runtime with the paths163 already fixed.164165Treat `ovstage.library_version()` as ovstage initialization for ordering166purposes because its version probe creates a temporary native instance. The167schema call must precede it in a stage-first process.168169### Run170171```bash172uv run main.py --png173# or with pip-installed ovrtx and ovstage:174python main.py --png175```176177A successful run writes `_output/render.png`. The output should match the documented minimal reference image.178179## Key Dependencies180181| Package | Purpose |182|---------|---------|183| `ovrtx` | Core renderer |184| `ovstage` | Runtime scene ownership for attached rendering |185| `pillow` | Image I/O (PNG, JPEG) |186| `numpy` | Array manipulation, DLPack interop |187| `warp-lang` | GPU compute kernels |188| `rerun-sdk` | Real-time visualization |189190## Troubleshooting191192- If `uv` is missing (`uv: command not found`), install `uv` before using the recommended setup commands, or translate the dependency steps to an equivalent `pip`/virtualenv workflow. PyPI is still the package source.193- ovrtx supports Python 3.10-3.13. If install resolution fails, no matching wheel is found, or imports fail on another Python version, recreate the environment with a supported interpreter (`uv python install 3.13` and `uv python pin 3.13`, or a virtualenv using Python 3.10-3.13). Do not work around unsupported interpreters by editing ovrtx dependency constraints.194- If package installation fails (`uv add ovrtx ovstage` or `pip install ovrtx ovstage` for attached mode), classify the failure before treating it as an ovrtx issue: resolver or `no matching distribution` errors usually indicate an unsupported Python version or platform; connection, TLS, timeout, or index errors usually indicate PyPI/network/proxy access; wheel download or install errors may require checking the target platform tag. PyPI is the recommended package source. GitHub Releases contain Python wheels for explicit release-artifact installs, not normal consumption. Do not edit ovrtx constraints to force unsupported interpreters or platforms. If both PyPI and an explicit release wheel fail, report the exact Python version, OS/architecture, platform tag, command, and full error.195- If `pytest` fails before test assertions because ovrtx cannot load `libovrtx-dynamic.so`, `ovrtx-dynamic.dll`, or required runtime directories, classify it as a package/runtime layout issue rather than a test failure. If pytest reaches runtime validation and fails because the host lacks an RTX GPU, a supported driver, unsandboxed execution, or internet access for remote S3 assets, report the missing prerequisite explicitly. Do not treat import-only, docs-only, or prerequisite-blocked pytest runs as successful runtime validation.196- ovrtx runtime validation requires an NVIDIA RTX-capable GPU and a supported NVIDIA driver. If no RTX GPU is visible, rerun validation outside the sandbox. If no RTX GPU is still visible, stop runtime validation and tell the user they need an RTX GPU.197- Supported NVIDIA driver versions are listed in `docs/driver_requirements.rst`. Use that page as the ovrtx source of truth for runtime validation. If driver detection fails, the driver is inaccessible, or the detected version is older than the listed baseline for the host OS, GPU generation, and GPU type, rerun validation outside the sandbox. If the driver is still missing or incompatible, stop runtime validation and tell the user they need a supported NVIDIA driver.198- Run ovrtx-related runtime code outside sandboxed environments.199- Examples that load remote S3 assets require internet access.200- The first step from a newly built application will block for 1-2 minutes while shaders are compiled and cached. Wait at least 5 minutes before treating this as a failure.201- USD files can be loaded from local paths, `file://` URIs, or `https://` URLs.202203## Standalone Compatibility (ovrtx 0.4)204205The scaffold above follows the current attached-stage workflow. ovstage can be206omitted when maintaining standalone compatibility code, but the renderer-owned207scene APIs used by that mode are deprecated as scene ownership transitions208entirely to ovstage in a future release:209210```toml211dependencies = [212 "ovrtx>=0.4",213 "ovstage>=0.1",214]215```216217See `docs/core/ovstage_integration.rst` for the attached-mode overview.218219## References220221- Use the `> **Source:**` directives in this skill to locate tested snippets before reusing API patterns.222- Keep related skills, docs, and snippets synchronized when changing the workflow.