# Default platform pyproject.toml (x86, GB200, and any non-Jetson GPU) [build-system] requires = ["setuptools>=67", "wheel", "pip"] build-backend = "setuptools.build_meta" [project] name = "gr00t" version = "0.1.0" requires-python = ">=3.12,<3.13" dependencies = [ "albumentations==1.4.18", "huggingface-hub[cli]", "opencv-python-headless>=4.5,<4.13", "diffusers==0.35.1", "dm-tree", "lmdb==1.7.5", "msgpack==1.1.0", "msgpack-numpy==0.4.8", "pandas==2.2.3", "peft==0.17.1", "termcolor==3.2.0", "torch==2.9.0", "torchvision==0.24.0", "transformers==4.57.3", "tyro==0.9.17", "click==8.1.8", "datasets==3.6.0", "cryptography>=46.0.7", "einops==0.8.1", "gitpython==3.1.50", "jsonlines==4.0.0", "gymnasium==1.2.2", "matplotlib==3.10.1", "numpy==1.26.4", "omegaconf==2.3.0", "scipy==1.15.3", # torchcodec 0.8.0 pairs with torch 2.9 and supports FFmpeg 4-7. It does NOT # support FFmpeg 8 (the default on Ubuntu 25.10+/26.04); on those distros # install an FFmpeg<8 runtime. x86_64: PyPI wheel; aarch64 Linux: prebuilt # wheel in scripts/deployment/dgpu/wheels/ (no aarch64 wheel published on PyPI). "torchcodec==0.8.0; platform_machine == 'x86_64'", "torchcodec==0.8.0; platform_machine == 'aarch64' and sys_platform == 'linux'", "wandb==0.23.0", "pyzmq==27.0.1", # deepspeed publishes wheels only for x86_64 Linux. "deepspeed==0.17.6; sys_platform == 'linux' and platform_machine == 'x86_64'", # triton is needed on aarch64 (GB200) but ships with torch on x86_64 "triton==3.5.0; sys_platform == 'linux' and platform_machine == 'aarch64'", # flash-attn wheels are sourced from `[tool.uv.sources]` below (official cp312 wheels for x86_64 and aarch64). "flash-attn==2.8.3; sys_platform == 'linux' and (platform_machine == 'x86_64' or platform_machine == 'aarch64')", "onnx>=1.20.0", "onnxscript", # cu12 wheels only exist for x86_64; Blackwell / aarch64 requires cu13. "tensorrt-cu12>=10.15.1.29; platform_machine == 'x86_64'", "tensorrt-cu13>=10.15.1.29; platform_machine == 'aarch64'", "tensorrt-cu12-libs>=10.15.1.29; platform_machine == 'x86_64'", "tensorrt-cu13-libs>=10.15.1.29; platform_machine == 'aarch64'", ] [project.optional-dependencies] dev = [ "boto3", "ruff", "ipython", "pip-licenses", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "build", "pre-commit", # `tomllib` is 3.11+ stdlib; provide `tomli` for the 3.10 fallback. "tomli; python_version < '3.11'", ] [tool.setuptools.packages.find] where = ["."] include = ["gr00t*"] [tool.uv] required-environments = [ "sys_platform == 'linux' and platform_machine == 'x86_64'", "sys_platform == 'linux' and platform_machine == 'aarch64'", ] [tool.uv.sources] torch = [ { index = "pytorch-cu128", marker = "sys_platform == 'linux'" }, ] torchvision = [ { index = "pytorch-cu128", marker = "sys_platform == 'linux'" }, ] triton = [ { index = "pytorch-cu128", marker = "sys_platform == 'linux'" }, ] flash-attn = [ { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu12torch2.9cxx11abiTRUE-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" }, { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu12torch2.9cxx11abiTRUE-cp312-cp312-linux_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" }, ] torchcodec = [ { path = "scripts/deployment/dgpu/wheels/torchcodec-0.8.0-cp312-cp312-linux_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" }, ] tensorrt-cu12-libs = [ { index = "nvidia-pypi", marker = "platform_machine == 'x86_64'" }, ] tensorrt-cu13-libs = [ { index = "nvidia-pypi", marker = "platform_machine == 'aarch64'" }, ] [tool.uv.extra-build-dependencies] flash-attn = ["torch==2.9.0", "numpy==1.26.4", "triton==3.5.0"] [tool.pytest.ini_options] pythonpath = [".", "tests"] addopts = "--import-mode=importlib" markers = [ "gpu: tests that require a GPU", "edge_device: tests that run on edge device runners (Orin, Thor, DGX Spark)", "multigpu: tests that require multiple GPUs and use all visible GPUs", "serial: run in the CPU job's serial phase instead of under pytest-xdist -n auto (e.g. it forks torch-importing subprocesses that oversubscribe the box and time out under full fan-out)", ] # Include fixture setup/teardown in JUnit so duration # reports (ci/print_duration_summary.py) and TestRun.duration in testdb # reflect real wall-clock time. With the default ("call"), expensive # session/module/class-scoped fixtures (e.g. NFS->local model staging, # Gr00tPolicy load) are invisible and tests look misleadingly fast. junit_duration_report = "total" [tool.ruff] line-length = 100 target-version = "py312" src = ["gr00t"] exclude = [ "__pycache__", ".git", ".mypy_cache", ".pytest_cache", ".vscode", ".venv", "dist", "logs", "*.ipynb", "external_dependencies", ] [tool.ruff.format] quote-style = "double" indent-style = "space" docstring-code-format = true [tool.ruff.lint] select = ["E", "F", "I"] ignore = ["E501"] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] [tool.ruff.lint.isort] case-sensitive = false combine-as-imports = true force-sort-within-sections = true force-wrap-aliases = false split-on-trailing-comma = false lines-after-imports = 2 section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] [[tool.uv.index]] name = "nvidia-pypi" url = "https://pypi.nvidia.com" explicit = true [[tool.uv.index]] name = "pytorch-cu128" url = "https://download.pytorch.org/whl/cu128" explicit = true