Install NeMo AutoModel
This guide explains how to install NeMo AutoModel for LLM, VLM, and OMNI models on various platforms and environments. Depending on your use case, there are several ways to install it:
Choose Your Installation Method
Pick the installation method that matches your needs and platform.
Decision Criteria
When to Use Docker Containers
Use Docker containers when you need:
- Multi-node deployments: Containers ensure consistency across cluster nodes
- Production environments: Reproducible builds with tested dependency versions
- GPU driver compatibility: Isolates CUDA/driver versions from host system
- Debian-based systems: Recommended for Ubuntu, Debian, and derivatives due to dependency complexity
- Complex dependencies: Pre-configured environment with all optimizations (TransformerEngine, DeepEP, etc.)
- Team consistency: Same environment across development, testing, and production
When to Use virtualenv
Use virtualenv (PyPI, Git, or editable install) when you need:
- Local development: Fast iteration on code changes
- Quick prototyping: Minimal setup for experimentation
- macOS systems: Better native support without container overhead
- Frequent code changes: Contributors working on the codebase (use editable install)
- Compatible GPU drivers: System has correct CUDA toolkit and drivers installed
- Lightweight setup: Minimal disk space and memory footprint
Platform-Specific Recommendations
Linux (Debian-based: Ubuntu, Debian)
Recommended: Docker Container
Debian-based systems can have dependency conflicts with system packages. Containers provide isolation and consistency.
Alternative: virtualenv (if Docker is not available)
Ensure CUDA 11.8+ and compatible drivers are installed:
Linux (RHEL, CentOS, Fedora)
Recommended: Docker Container
Containers avoid enterprise Linux package management complexity.
Follow the same Docker commands as Debian-based systems above.
macOS
Recommended: virtualenv
Docker on macOS has GPU limitations. Use native Python installation:
GPU training on macOS is not supported. Use macOS for CPU-based experimentation or remote cluster submission.
Windows
Recommended: WSL2 + Docker
Run NeMo AutoModel in WSL2 with Docker Desktop:
- Install WSL2 and Docker Desktop.
- Use Docker container within WSL2 (follow Linux instructions).
Alternative: WSL2 and virtualenv
Install directly in WSL2 Ubuntu environment (follow Debian instructions).
Common Issues and Solutions
GPU driver compatibility errors
- Problem: CUDA version mismatch between host and application
- Solution: Use Docker container to isolate driver versions
Dependency conflicts on Debian/Ubuntu
- Problem: System packages conflict with Python packages
- Solution: Use Docker container or create isolated virtualenv with
uv
Out of memory during container startup
- Problem: Insufficient shared memory for PyTorch data loading
- Solution: Increase
--shm-sizeparameter (e.g.,--shm-size=16g)
TransformerEngine import failures
- Problem: Incorrect CUDA toolkit or missing dependencies
- Solution: Use pre-configured Docker container
Prerequisites
System Requirements
- Python: 3.10 or higher
- CUDA: 11.8 or higher (for GPU support)
- Memory: Minimum 16GB RAM, 32GB+ recommended
- Storage: At least 50GB free space for models and datasets
Hardware Requirements
- GPU: NVIDIA GPU with 8GB+ VRAM (16GB+ recommended)
- CPU: Multi-core processor (8+ cores recommended)
- Network: Stable internet connection for downloading models
Installation Options for Non-Developers
This section explains the easiest installation options for non-developers, including using pip3 via PyPI or leveraging a preconfigured NVIDIA NeMo Docker container. Both methods offer quick access to the latest stable release of NeMo AutoModel with all required dependencies.
Install via PyPI (Recommended)
For most users, the easiest way to get started is using pip3.
This installs the latest stable release of NeMo AutoModel from PyPI.
To verify the install, run python -c "import nemo_automodel; print(nemo_automodel.__version__)". See nemo-automodel on PyPI.
Install with NeMo Docker Container
You can use NeMo AutoModel with the NeMo Docker container. Pull the container by running:
The above docker command uses the 26.06.00 container. Use the most recent container version to ensure you get the latest version of AutoModel and its dependencies like PyTorch, Transformers, etc.
Then you can enter the container using:
Persist your checkpoints. By default, checkpoints are written to checkpoints/ inside the container. Because --rm destroys the container on exit, any data stored only inside the container is lost. Always bind-mount a host directory for the checkpoint path (as shown with -v above) so that your trained weights survive after the container stops. You can also mount additional directories for datasets and Hugging Face cache:
Models that require CUDA-specific packages (e.g., Nemotron). Some model families—such as Nemotron Nano and Nemotron Flash—depend on packages like mamba-ssm and causal-conv1d that must be compiled against a matching CUDA toolkit. Installing these from source on a bare-metal host can be error-prone. The NeMo Automodel Docker container ships with these dependencies pre-built, so using the container is the recommended approach for fine-tuning Nemotron and other models with similar requirements.
Installation Options for Developers
This section provides installation options for developers, including pulling the latest source from GitHub, using editable mode, or mounting the repo inside a NeMo Docker container.
Install from GitHub (Source)
If you want the latest features from the main branch or want to contribute:
Option A – Use pip With Git Repo
This installs the repo as a standard Python package (not editable).
Option B – Use uv With Git Repo
uv handles virtual environment transparently and enables more reproducible installs.
Install in Developer Mode (Editable Install)
To contribute or modify the code:
This installs AutoModel in editable mode, so changes to the code are immediately reflected in Python.
Mount the Repo into a NeMo Docker Container
To develop against your local checkout while reusing the container’s pre-built dependencies, bind-mount your local Automodel directory over /opt/Automodel, overriding the source installed in the image:
The update_pyproject_pytorch.sh step is required. Without it, uv sync tries to reinstall torch, which causes CUDA version mismatches and TransformerEngine import failures, because uv cannot recognize the torch baked into the PyTorch base container.
Install Profiles
NeMo AutoModel provides several install extras for different use cases.
Full Install (default)
Installs the core library with all LLM training dependencies (PyTorch, CUDA, etc.):
CLI-Only Install (Login Nodes)
If you only need to submit jobs from a login node or CI environment (SLURM, SkyPilot, NeMo-Run) and do not need to run training locally, use the lightweight CLI-only install:
This installs only pyyaml — no PyTorch, no CUDA. The automodel and am
CLI commands will be available for SLURM and SkyPilot job submission. If you
also need the NeMo-Run launcher, install it separately (pip install nemo-run).
If you accidentally try to run a local/interactive job with this install, you
will get a clear error with instructions to install the full package.
VLM Dependencies
For vision-language model training, add the VLM extras:
CUDA-Specific Packages
For models requiring TransformerEngine, bitsandbytes, Mamba, or other CUDA-compiled packages:
All Extras
Install everything (CUDA, VLM, NeMo-Run, etc.):
You can combine extras: pip3 install nemo-automodel[vlm,cuda]