Installation
This guide covers the installation of MONAI Physio and its dependencies.
Prerequisites
System Requirements
Python: 3.11, 3.12, or 3.13
GPU: NVIDIA GPU of compute capability 7.5 (Turing) or newer, with a driver for CUDA 12.8 or newer, required. Surface extraction, segmentation, and the AI surrogates run on the GPU; there is no CPU-only mode.
RAM: 16GB minimum (32GB+ recommended for large datasets)
Storage: 10GB+ for package and model weights
Visualization: NVIDIA Omniverse (optional, for USD visualization)
Software Dependencies
Installed with MONAI Physio:
Medical Imaging: ITK, MONAI, nibabel, PyVista
AI/ML: transformers, MONAI (PyTorch itself is installed first; see below)
AI surrogates: PhysicsNeMo (
nvidia-physicsnemo), torch-geometricFluid simulation: NVIDIA Warp (
warp-lang)Registration: icon-registration, unigradicon
Visualization: USD-core, PyVista
Segmentation: TotalSegmentator
Installing
Create and activate a virtual environment first (python -m venv .venv,
then source .venv/bin/activate on Linux or .venv\Scripts\activate on
Windows). Then install, in this order:
1. PyTorch for your GPU. Pick the command for your platform and CUDA version from the PyTorch selector, for example:
pip install torch==2.11.0 torchvision --index-url https://download.pytorch.org/whl/cu128
MONAI Physio uses whichever PyTorch is installed; installing it first is what
gives you a CUDA build (pip install monai-physio alone takes PyTorch from
PyPI, which is CPU-only on Windows).
2. torch-scatter - for the AI surrogates. PhysicsNeMo’s MeshGraphNet
needs it for training and for every inference that uses a trained
MeshGraphNet, including motion inference with
WorkflowInferMovement: Tutorials 9 to 15, 17 and 18.
It is a compiled extension that must match your PyTorch build. Prebuilt
wheels are on the PyTorch Geometric index; use the page for your PyTorch
minor version and CUDA build, torch-<major>.<minor>.0+<cuda>.html,
which serves every patch release of that minor version. Take the
version and CUDA build from torch.__version__ (for 2.11.0+cu128 or
2.11.1+cu128, the page is torch-2.11.0+cu128.html):
pip install torch-scatter --only-binary torch-scatter -f https://data.pyg.org/whl/torch-2.11.0+cu128.html
--only-binary makes pip stop with an error when no wheel matches, rather
than start a source build. If that happens, see Building torch-scatter.
3. cuDSS - for fluid simulation (WarpFlowNS,
WarpFluidStructureNS and Tutorials 20 and 21). Install
the wheel for the CUDA major version of your PyTorch (torch.version.cuda):
pip install nvidia-cudss-cu12 # or nvidia-cudss-cu13 for a CUDA 13 PyTorch
The CUDA 13 wheel needs NVIDIA driver R580 or newer. MONAI Physio looks for
cuDSS in the installed wheels and then on the system library search path. To
use a cuDSS installed elsewhere, such as by NVIDIA’s standalone installer, set
the CUDSS_LIBRARY environment variable to its shared library file
(cudss64_<n>.dll on Windows, libcudss.so.<n> on Linux). To check
which library MONAI Physio will load:
python -c "from monai_physio import WarpCuDssFactor; print(WarpCuDssFactor.find_library())"
4. MONAI Physio:
pip install monai-physio
Skip steps 2 and 3 if you do not need those features; the rest of MONAI
Physio runs without them, and the features that need them say so when called.
uv pip can be used in place of pip in every step.
Optional extras
[aorta]- the aortic blood-flow subpackagemonai_physio.aorta(Tutorials 19 to 21):scikit-imagefor the aorta centerline plus the[netgen]extra for the lumen and wall meshes.import monai_physiodoes not import the subpackage; import its classes frommonai_physio.aorta. Install withpip install "monai-physio[aorta]"; Tutorials 20 and 21 also need cuDSS (step 3). It cannot install on Linux aarch64, wherenetgen-mesherpublishes no wheel.[netgen]-netgen-mesher(LGPL-2.1), needed only byextract_label_tetrahedra_netgen()for unstructured tetrahedral meshes. Wheels cover Windows x64, Linux x86_64, and macOS; there is none for Linux aarch64. Install withpip install "monai-physio[netgen]".[dev]- development, test and documentation tooling plus[aorta](and through it[netgen]), for source installs; see below.
Building torch-scatter
PyTorch Geometric publishes torch-scatter wheels
(https://data.pyg.org/whl/) only for specific
(torch, CUDA, Python, platform) combinations. At the time of writing:
CUDA 12.8 PyTorch 2.10 and 2.11 have wheels on Windows and Linux. This is the newest CUDA 12 build with kernels for Blackwell GPUs.
CUDA 13.0 PyTorch 2.10 to 2.12 have wheels on Linux only.
PyTorch 2.13 and newer have none.
For any other combination, build torch-scatter from source against the
installed PyTorch. The build needs:
a CUDA toolkit whose
nvccis onPATHand matches the CUDA version of PyTorch (torch.version.cuda); see CUDA Installation;a C++ toolchain: MSVC Build Tools on Windows, gcc/g++ on Linux;
build isolation disabled, so the build sees the installed PyTorch;
the wheel cache bypassed, because pip’s cache does not record the PyTorch a cached
torch-scatterbuild was compiled against and would otherwise reuse one built for a different PyTorch.
pip install setuptools wheel
pip install torch-scatter --no-build-isolation --no-cache-dir
On Windows, run this from a plain shell rather than an MSVC developer prompt
(or set DISTUTILS_USE_SDK=1 in one), and first set
CL=/std:c++20 /Zc:preprocessor (PowerShell:
$env:CL = "/std:c++20 /Zc:preprocessor"). On Linux, set
CXXFLAGS=-std=c++20. The build takes about ten minutes.
Installing from Source
Step 1: Clone the repository
git clone https://github.com/Project-MONAI/monai-physio.git
cd monai-physio
Step 2: Create virtual environment
python -m venv venv
source venv/bin/activate
python -m venv venv
venv\Scripts\activate
Step 3: Install PyTorch, torch-scatter and cuDSS as in steps 1 to 3 of Installing above. The full test suite uses all three.
Step 4: Install MONAI Physio
A source install implies running tests and building docs, so use the dev
extra:
pip install -e ".[dev]"
dev includes [aorta] and [netgen], so it cannot install on Linux
aarch64, where netgen-mesher publishes no wheel. There, run
pip install -e . and install the tools listed under Development Tools
below that you need; the netgen and aorta tests skip without netgen-mesher.
Development Tools
The dev extra - which also pulls in the aorta and netgen extras so
the netgen meshing and aorta tests can run - provides:
ruff (linting and formatting)
mypy (type checking)
pytest, pytest-cov, pytest-xdist (testing)
pre-commit (git hooks for automatic checks)
sphinx and extensions (documentation)
ICON registration and fine-tuning
Registration and fine-tuning use the published packages
icon-registration>=1.1.9 and unigradicon>=1.0.6. The
unigradicon.finetuning.finetune module is included in uniGradICON 1.0.6;
no branch checkout or local package patch is required. Both packages are
installed by the standard MONAI Physio commands above.
To update an environment that previously used the fine-tuning branch:
pip install --upgrade "icon-registration>=1.1.9" "unigradicon>=1.0.6"
python -m unigradicon.finetuning.finetune --help
Remove an old uniGradICON source directory from PYTHONPATH if it shadows
the installed package. Leave WorkflowFinetuneICONRegistration’s
unigradicon_src_path unset for the published package; that optional argument
remains available for intentional source development. Existing workflow calls
and checkpoint paths are unchanged.
Verify Installation
After installation, verify that MONAI Physio is correctly installed:
import monai_physio
from monai_physio import WorkflowConvertImageToUSD
print(f"MONAI Physio version: {monai_physio.__version__}")
print(WorkflowConvertImageToUSD.__name__)
Expected output:
MONAI Physio version: 2026.12.0
WorkflowConvertImageToUSD
Command-Line Tools
MONAI Physio installs eleven command-line tools, each prefixed
monai-physio-. There is no bare monai_physio command; check the install
with any one of them:
# Check CLI is available
monai-physio-download-data --help
monai-physio-convert-image-to-usd --help
See CLI & Scripts Overview for the full list.
GPU Setup
CUDA Installation
The PyTorch, cuDSS and Warp wheels bring their own CUDA runtime libraries; only the NVIDIA driver is needed to run MONAI Physio. The CUDA Toolkit is needed only to build torch-scatter. Download it from NVIDIA’s website, then verify:
nvcc --version
nvidia-smi
Optional External Software
One segmentation and meshing backend is not a Python dependency and cannot be installed with pip:
Synopsys Simpleware Medical - required by
SegmentHeartSimplewareandSegmentHeartSimplewareTrimmedBranches(ASCardio module), and therefore by Tutorial 13, which uses Simpleware to segment the heart; and byextract_label_tetrahedra_simpleware()(+FE Free module) for tetrahedral meshing. It needs a local installation licensed for whichever of those modules is used; see Simpleware Heart Segmenter and Volumetric Mesh Tools. The default executable path isC:/Program Files/Synopsys/Simpleware Medical/Y-2026.03/ConsoleSimplewareMedical.exe; override it withset_simpleware_executable_path()on either class. Everything else in the toolkit runs without it, and therequires_simplewaretests skip cleanly when it is absent.
PyTorch with CUDA
To verify that the installed PyTorch is a CUDA build that runs on your GPU:
import torch
print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"CUDA version: {torch.version.cuda}")
print(torch.ones(1, device="cuda") + 1) # fails if the build lacks kernels for this GPU
If you installed torch-scatter (step 2), also check that it matches the
installed PyTorch:
import torch_scatter # fails if torch-scatter was built for another PyTorch
Troubleshooting
Common Issues
Issue: CUDA out of memory
Solution: Reduce batch sizes or process smaller images. Most MONAI Physio functions work with limited GPU memory.
Issue: Import errors for ITK or VTK
Solution: These packages sometimes require system dependencies. On Ubuntu:
sudo apt-get update
sudo apt-get install libgl1-mesa-glx libglib2.0-0
Issue: TotalSegmentator download fails
Solution: TotalSegmentator downloads models on first use. Ensure you have:
Stable internet connection
Sufficient disk space (~2GB for models)
Write permissions in the cache directory
Issue: USD files not rendering in Omniverse
Solution:
Ensure NVIDIA Omniverse is installed
Set the viewport renderer to RTX and switch to the scene’s
/World/Camera; see Viewing USD FilesVerify file paths are accessible to Omniverse
Getting Help
If you encounter issues:
Check the Troubleshooting guide
Search GitHub Issues
Open a new issue with:
Python version
CUDA version
Error messages
Minimal code to reproduce
Next Steps
Continue to Quick Start for your first MONAI Physio workflow
Explore Tutorials for runnable, workflow-by-workflow examples
Read CLI & Scripts Overview for detailed command-line workflows