Using automatic deps management¶
This page explains how to use RAITAP's automatic dependency management. It lists hardware gotchas and useful flags.
Installing the deps¶
RAITAP will automatically analyse your config and install the deps when you run the job.
uv run raitap --config-dir my-configs --config-name assessment
raitap --config-dir my-configs --config-name assessment
Useful flags¶
Depending on your setup (uv, pip, ...) you might need to pass additional flags to make the install fully automatic.
Flag |
When |
|---|---|
Preview the inferred install |
|
|
Let RAITAP modify your |
Install into the global Pip environment (not recommended) |
Hardware gotchas¶
If you use a GPU, you will need to tweak your pyproject.toml. This is due to PyPI and ecosystem limitations.
Important
Replace BACKEND in the snippets below with torch or onnx depending on your setup.
On Linux, the plain torch package from PyPI is the CUDA build. Route it to the CPU index by adding the following to your pyproject.toml:
[project]
dependencies = [
"raitap[BACKEND-cpu]>=0.9",
"torch; sys_platform == 'linux'", # redeclare to make the index below apply
"torchvision; sys_platform == 'linux'", # redeclare to make the index below apply
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
torchvision = { index = "pytorch-cpu" }
torch does not publish separate CUDA builds on PyPI. You control the version via the index by adding the following to your pyproject.toml:
[project]
dependencies = [
"raitap[BACKEND-cuda]>=0.9; sys_platform != 'darwin'",
"torch; sys_platform != 'darwin'", # redeclare to make the index below apply
"torchvision; sys_platform != 'darwin'", # redeclare to make the index below apply
]
[[tool.uv.index]]
name = "pytorch-cuda"
url = "https://download.pytorch.org/whl/cu126" # CUDA 12.6, modern default; for older GPUs see below
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cuda" }
torchvision = { index = "pytorch-cuda" }
Builds for older NVIDIA GPUs (Volta / V100)
The cu126 wheels may not suit older cards.
Find your GPU generation on NVIDIA's current / legacy pages and a matching release on the PyTorch releases page.
Set the index
urlin yourpyproject.tomlto the matching family (see above), then runuv lock.Run RAITAP.
triton-xpu's PyPI releases are either yanked or pre-release. Route it to the Intel index by adding the following to your pyproject.toml:
[project]
dependencies = [
"raitap[BACKEND-intel]>=0.9; sys_platform != 'darwin'",
"torch; sys_platform != 'darwin'", # redeclare to make the index below apply
"torchvision; sys_platform != 'darwin'", # redeclare to make the index below apply
"triton-xpu>=3.0.0rc0; sys_platform != 'darwin' and python_full_version < '3.14'",
]
[[tool.uv.index]]
name = "pytorch-intel"
url = "https://download.pytorch.org/whl/xpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-intel" }
torchvision = { index = "pytorch-intel" }
triton-xpu = { index = "pytorch-intel" }
Wheel availability¶
PyTorch indexes don't publish for every Python minor:
Extra |
Index |
Python |
Platforms |
|---|---|---|---|
|
|
3.11–3.13 |
Linux, macOS, Windows |
|
|
3.11–3.13 |
Linux, Windows |
|
|
3.11–3.13 |
Linux, Windows |
Faster locking on one OS¶
If you only target one OS, scope the resolver so it doesn't solve for all platforms at once:
[tool.uv]
environments = ["sys_platform == 'linux' and python_version >= '3.12'"]