agentleFS
NVIDIA-NeMoNVIDIA-NeMo/Automodel/.agents/contributor-skills/build-and-dependency/SKILL.md

build-and-dependency

Skill1k starsChanged 20 days agoApache-2.0View on GitHub

Dev environment setup for NeMo AutoModel — container-based development, uv package management, installation options, environment variables, and common build pitfalls. Use when setting up a dev environment, adding or removing dependencies, switching container images, configuring environment variables, 'uv sync fails', 'ModuleNotFoundError', 'TransformerEngine version mismatch', stale .venv issues.

  • Reads credentials
  • Installs packages

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always use uv. Do not introduce pip install commands in scripts or docs.

    line 109
  2. Distinctive:

    When upgrading dependencies, review compatibility backports and their version gates.

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build and Dependency

Quick Start

Clone and install:

git clone https://github.com/NVIDIA-NeMo/Automodel.git && cd Automodel
uv sync --locked --all-groups --extra all

Or use the NeMo-AutoModel 26.10 container from NVIDIA NGC:

docker pull nvcr.io/nvidia/nemo-automodel:26.10.00
docker run --gpus all -it nvcr.io/nvidia/nemo-automodel:26.10.00

Installation Options

Option 1: NeMo-AutoModel Container (NGC)

The container ships with all dependencies pre-installed at /opt/Automodel (WORKDIR) with the venv at /opt/venv. Run as-is:

docker run --gpus all --network=host -it --rm --shm-size=32g \
    nvcr.io/nvidia/nemo-automodel:26.10.00 /bin/bash

Mounting your local checkout into the container

To develop against your host checkout, bind-mount it over /opt/Automodel to override the installed source:

docker run --gpus all --network=host -it --rm --shm-size=32g \
    -v <local-Automodel-path>:/opt/Automodel \
    nvcr.io/nvidia/nemo-automodel:26.10.00 /bin/bash

Inside the container, patch pyproject.toml / uv.lock for the PyTorch base image, then re-sync:

cd /opt/Automodel
bash docker/common/update_pyproject_pytorch.sh /opt/Automodel
uv sync --locked --all-groups --extra all

Warning: the update_pyproject_pytorch.sh step is required. Without it, uv sync will try to reinstall torch, which leads to CUDA version mismatches and TE import failures — uv cannot recognize the torch baked into the PyTorch base container.

Option 2: uv (Recommended for Local Development)

--all-groups pulls the build, docs, and test dev groups (defined in pyproject.toml); drop it for a runtime-only install.

uv sync --locked --all-groups                          # base + dev groups
uv sync --locked --all-groups --extra cuda             # CUDA support
uv sync --locked --all-groups --extra fa               # flash-attention
uv sync --locked --all-groups --extra moe              # mixture-of-experts
uv sync --locked --all-groups --extra vlm              # vision-language models (core)
uv sync --locked --all-groups --extra vlm-media        # + video/Qwen/Mistral decode (opencv, decord, qwen-utils; FFmpeg-bearing)
uv sync --locked --all-groups --extra diffusion        # diffusion models
uv sync --locked --all-groups --extra diffusion-media  # + diffusion preprocessing/export (imageio-ffmpeg, opencv)
uv sync --locked --all-groups --extra media            # vlm-media + diffusion-media (union)
uv sync --locked --all-groups --extra delta-databricks # Delta Lake / Databricks
uv sync --locked --all-groups --extra msa              # MiniMax M3 MSA sparse prefill (official MiniMax-AI/MSA with the model-private compatibility patch; Linux + SM100; run via `uv run` so torch finds `ninja`)
uv sync --locked --all-groups --extra all              # all standard extras (EXCLUDES media — FFmpeg kept opt-in)

The media extras (vlm-media, diffusion-media, media) bundle FFmpeg and are deliberately excluded from all and from the container image — add them explicitly for video/image decode.

Option 3: uv pip

Full install (matches uv sync --extra all):

uv venv
source .venv/bin/activate
uv pip install -e ".[all]"

To add NeMo Run submission support to the base package:

uv venv
source .venv/bin/activate
uv pip install "nemo-automodel[cli]"

The cli extra is additive: it adds nemo-run but does not remove the base package's core training dependencies, including PyTorch.

Package Management

Always use uv. Do not introduce pip install commands in scripts or docs.

When upgrading dependencies, review compatibility backports and their version gates. Verify the candidate release contains the upstream fix before removing or bypassing a backport; never assume a future or patch release is fixed. If a backport remains necessary, validate it on the candidate release before extending its gate. Run the affected regression tests with the actual dependency and required backends; mocked version strings and skipped tests are not compatibility evidence. Record the release evidence and test results in the upgrade PR.

TaskCommand
Install from lockfileuv sync --locked
Add a new dependencyuv add <package>
Add an optional dependencyuv add --optional --extra <group> <package>
Regenerate the lockfileuv lock

Environment Variables

export HF_TOKEN="hf_..."           # Hugging Face token for gated models
export WANDB_API_KEY="..."         # Weights & Biases logging
export HF_HOME="/path/to/hf_cache" # Hugging Face cache directory

CLI Usage

The entry point is automodel (defined at nemo_automodel.cli.app:main).

Pattern: uv run automodel <config.yaml> [--nproc-per-node N] [--key.subkey value ...]

# The YAML's recipe field selects LLM, VLM, diffusion, or retrieval behavior.
uv run automodel examples/llm_finetune/llama3_2/llama3_2_1b_squad.yaml --nproc-per-node 8

Override any config value from the CLI:

uv run automodel examples/llm_finetune/llama3_2/llama3_2_1b_squad.yaml \
    --model.pretrained_model_name_or_path meta-llama/Llama-3.2-1B

Common Pitfalls

ProblemCauseFix
Stale .venv after switching branchesCached environment out of syncDelete .venv and re-run uv sync --locked
Import errors for optional features (TE, flash-attn, MoE)Missing extrasInstall the matching uv extra (--extra fa, --extra moe, etc.)
Import errors for media (cv2, decord, qwen_vl_utils, imageio_ffmpeg)Media extras are opt-in (not in all)Install --extra vlm-media (VLM/Qwen/Mistral) or --extra diffusion-media (diffusion)
TransformerEngine version mismatchThe TE installed by uv sync takes precedence over the version baked into the containerSet the desired TE version in pyproject.toml / uv.lock and re-run uv sync — the venv's TE wins, not the container's

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 3 mentionsJan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 7 mentionsMay 2026: 2 mentionsJun 2026: 1 mentionJul 2026: 6 mentionsAug 2026: 2 mentionsSep 2026: 8 mentionsOct 2026: 6 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA-NeMo/Automodel repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about NVIDIA-NeMo/Automodel

The biggest 5 of 43 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 43

Talked about on GitHub (43 times).

On GitHub · 43

38 more on GitHub

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.