> 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.

# Prerequisites

Before deploying a NIM LLM container, ensure your environment meets the following requirements:

## Hardware Requirements

Minimum required specifications for supported hardware components.

| Requirement | Specification                                         |
| :---------- | :---------------------------------------------------- |
| **CPU**     | AMD64, ARM64                                          |
| **GPU**     | [Any supported NVIDIA GPU](/nim/large-language-models/2.0.8/reference/support-matrix) |

### Model GPU Memory Requirements

Different models require different minimum amounts of GPU memory. For example, Llama 3.1 8B Instruct requires a minimum of 24GB of GPU memory.

Ensure your chosen hardware configuration meets the minimum GPU memory requirement for the model profile you wish to run. For more information, refer to [Model Profiles](/nim/large-language-models/2.0.8/deployment/model-profiles-and-selection) and [Support Matrix for Certified NIMs](/nim/large-language-models/2.0.8/reference/support-matrix).

## Software Requirements

Minimum required versions for supported software components.

| Requirement           | Specification                         |
| :-------------------- | :------------------------------------ |
| **Operating System**  | Ubuntu 22.04 LTS or later recommended |
| **Container Toolkit** | 1.14.0 or later                       |
| **CUDA SDK**          | 12.9 or later                         |
| **GPU Driver**        | 580 or later                          |
| **Docker**            | 24.0 or later                         |

### Operating System

While other Linux distributions can be compatible with NIM LLM, they have not been officially validated.

We recommend using Ubuntu 22.04 LTS or later for the best experience.

### CUDA SDK

Install CUDA SDK by following the [CUDA installation guide for Linux](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html).

### GPU Drivers

Install the NVIDIA GPU drivers by following the [NVIDIA Driver Installation Guide](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/choose-an-installation-method.html).

### Docker

Docker is required to run the containerized NIM services.

1. Install Docker Engine for your Linux distribution by following the [Docker Engine installation guide](https://docs.docker.com/engine/install/).
2. Verify that the Docker daemon is running and that your user can execute `docker` commands without `sudo`. Add your user to the `docker` group if needed:

   ```bash
   sudo groupadd docker
   sudo usermod -aG docker $USER
   ```
3. Log out and back in for the group change to take effect.

### Container Toolkit

The NVIDIA Container Toolkit enables Docker containers to access the host GPU.

1. Install the toolkit by following the [NVIDIA Container Toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-the-nvidia-container-toolkit).
2. Configure Docker to use the NVIDIA runtime by following the [Docker configuration steps](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-docker).
3. Restart the Docker daemon after configuration:

   ```bash
   sudo systemctl restart docker
   ```

## NIM Container Access

To download and deploy NIM containers, you need one of the following:

* A free [NVIDIA Developer Program](https://developer.nvidia.com/developer-program) membership.
* An NVIDIA AI Enterprise license. To request a free 90-day evaluation license, refer to [Ways to Get Started With NVIDIA AI Enterprise](https://www.nvidia.com/en-us/data-center/products/ai-enterprise/get-started) and [Activate Your NVIDIA AI Enterprise License](https://www.nvidia.com/en-us/data-center/activate-license/).

## Generate Access Credentials

#### Model-Specific NIM

### NGC Personal API Key

An NGC Personal API Key is required to access NVIDIA NIM containers and models hosted on NGC.

1. Generate the Personal API Key on the [Setup API Keys](https://org.ngc.nvidia.com/setup/api-keys) page.

2. When creating the Personal API key, select at least **NGC Catalog** from the
   **Services Included** list. You can also include additional services if you want
   to use the same key for other purposes.

> **Warning**
>
> Legacy API keys are not supported by NIM LLM. Always use a
> Personal API Key.

#### Model-Free NIM

### Hugging Face Access Token

The required credentials depend on your model source.

1. Complete the steps in the **Model-Specific NIM** tab to generate your NGC Personal API key. You will need one to pull the NIM container itself.
2. To download models, create a [Hugging Face access token](https://huggingface.co/docs/hub/en/security-tokens) with **read** permissions (or higher, only if your org or private repos require it). This token allows model-free NIM to fetch models directly from Hugging Face.

   > **Note**
   >
   > If you want to serve a pre-downloaded local model or a private cloud model instead of downloading one from Hugging Face, you do not need a Hugging Face access token. Refer to [Model Downloads](/nim/large-language-models/2.0.8/deployment/model-download) for your workflow.

## Verify NVIDIA Runtime Access

To ensure that your setup is correct, run the following command:

```sh
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
```

This command should produce output similar to one of the following, where you can confirm CUDA driver version, and available GPUs.

```console
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05              Driver Version: 580.95.05      CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA H100 80GB HBM3          On  |   00000000:1B:00.0 Off |                    0 |
| N/A   36C    P0            112W /  700W |   78489MiB /  81559MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
```