> This page is for version 2.0.8.
> For other versions, use one of these documentation indexes:
> - 2.1.6 (Latest) (default): https://docs.nvidia.com/nim/large-language-models/2.1.6/llms.txt
> - 2.1.5: https://docs.nvidia.com/nim/large-language-models/2.1.5/llms.txt
> - 2.1.4: https://docs.nvidia.com/nim/large-language-models/2.1.4/llms.txt
> - 2.0.13: https://docs.nvidia.com/nim/large-language-models/2.0.13/llms.txt
> - 2.0.12: https://docs.nvidia.com/nim/large-language-models/2.0.12/llms.txt
> - 2.0.11: https://docs.nvidia.com/nim/large-language-models/2.0.11/llms.txt
> - 2.0.10: https://docs.nvidia.com/nim/large-language-models/2.0.10/llms.txt
> - 2.0.9: https://docs.nvidia.com/nim/large-language-models/2.0.9/llms.txt
> - 2.0.8: https://docs.nvidia.com/nim/large-language-models/2.0.8/llms.txt
> - 2.0.4-pb6: https://docs.nvidia.com/nim/large-language-models/2.0.4-pb6/llms.txt
> - Archive: https://docs.nvidia.com/nim/large-language-models/archive/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/large-language-models/llms.txt.

# CLI Reference

## NIM LLM Command-Line Interface

NIM for LLMs is invoked as a container entrypoint. The first positional
argument selects the **action** to perform; any remaining arguments are
passed through to the underlying backend (vLLM).

### Synopsis

```text
docker run <image> [ACTION] [OPTIONS...]
```

When no action is specified, `nim-serve` is used by default.

### Actions

#### nim-serve

Start the NIM inference server. This is the default action.
Remaining arguments are forwarded to vLLM. Supports the
`--dry-run` flag to preview the resolved configuration
without launching.

```bash
docker run <image>
```

```bash
docker run <image> nim-serve --max-model-len 4096
```

```bash
docker run <image> nim-serve --dry-run
```

#### nim-serve-ray

Start the NIM server with Ray for multi-node
tensor-parallel inference. Requires `--head` (leader)
or `--head-address` (worker).

```bash
docker run <image> nim-serve-ray --head --port 6379
```

```bash
docker run <image> nim-serve-ray --head-address host:6379
```

#### list-model-profiles

List all available model profiles for the current
hardware.

```bash
docker run <image> list-model-profiles
```

#### download-to-cache

Download the selected model profile to the local cache
without starting the server. Accepts `--all` to
download all profiles, or `-p <profile>` for a
specific one.

```bash
docker run <image> download-to-cache
```

```bash
docker run <image> download-to-cache -p <profile_id>
```

#### download-model

Download the selected model profile and materialize a workspace (without
starting the server). `--workspace-path` selects the target directory;
when omitted a fresh temp directory is used, the same way `nim-serve`
allocates its workspace. Used by the Dynamo frontend pod, which allocates the
directory and passes the same path to `dynamo.frontend --model-path` for MDC
metadata resolution. When `NIM_IGNORE_WEIGHTS` is set, only non-weight
metadata files are materialized.

```bash
docker run <image> download-model
docker run <image> download-model --workspace-path /path/to/workspace
```

#### create-model-store

Materialize a cached model profile into a model store
directory. Requires `-p <profile>` and `-m <path>`.

```bash
docker run <image> create-model-store -p <profile_id> -m /path/to/store
```

#### show-build-info

Print build metadata (git SHAs, versions).

```bash
docker run <image> show-build-info
```

#### mirror

Mirror cached model profiles to an S3-compatible bucket or GCS bucket.

```bash
docker run <image> mirror s3 -b mybucket
docker run <image> mirror gcs -b my-gcs-bucket
```