> This page is for version 2.1.6 (Latest) (default).
> 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.

# Installation

> Configure your environment and pull the NIM LLM and VLM container image from NVIDIA NGC so you can run inference locally or in production.

Before running a NIM LLM and VLM container, configure your
environment and pull the container image. Most current public NIM images support
keyless access from NGC, so Docker login is optional unless your image, tag, or
model artifact requires credentials.

## Docker Login

If you created an NGC API key, authenticate with the NVIDIA Container Registry using the following command:

```bash
echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin
```

Use `$oauthtoken` as the username and `NGC_API_KEY` as the password. The `$oauthtoken` username is a special name that indicates that you authenticate with an API key and not a user name and password.

## Pull the Container Image

Use `docker pull` to fetch the NIM container image. For eligible public-catalog
NIMs, you can pull the image without Docker login. Authenticate first only when
you use a Production Branch (PB) NIM, a NIM released prior to
NIM LLM and VLM version 2.0.10, or a private or gated NIM image or
model artifact.

To find a link to the NGC Catalog page for a given NIM container image (for example,
[`meta/llama-3.1-8b-instruct`](https://catalog.ngc.nvidia.com/orgs/nim/teams/meta/containers/llama-3.1-8b-instruct)), refer to the [Support Matrix for NIMs](/nim/large-language-models/reference/support-matrix).

Choose the pull command that matches your container type:

#### Model-Specific NIM

To fetch a model-specific NIM container from the NGC registry, use the model's exact image tag. For example, for Llama-3.1-8B-Instruct:

```bash
docker pull nvcr.io/nim/meta/llama-3.1-8b-instruct:2.1.6
```

#### Model-Free NIM

To fetch a model-free NIM container from the NGC registry (the image you pull determines the inference engine, vLLM or SGLang), use the following command:

```bash
docker pull nvcr.io/nim/nvidia/vllm-model-free-nim:2.1.6
```

> **Note**
>
> The exact image tag varies depending on the container type and backend you intend to deploy. Check the [Support Matrix for NIMs](/nim/large-language-models/reference/support-matrix) for the model ID and version to use in the pull command for your preferred NVIDIA NIM container or model.