> This page is for AlphaFold2, version 2.1.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 2.1.0 (Latest) (default): https://docs.nvidia.com/nim/bionemo/alphafold2/2.1.0/llms.txt
> - 2.0.0: https://docs.nvidia.com/nim/bionemo/alphafold2/2.0.0/llms.txt
> - 1.2.0: https://docs.nvidia.com/nim/bionemo/alphafold2/1.2.0/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/bionemo/alphafold2/1.0.0/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/bionemo/llms.txt.

# AlphaFold2 Prerequisites

> Hardware, software, and NGC account prerequisites for deploying the NVIDIA AlphaFold2 NIM.

To get started with the AlphaFold2 NIM, you must complete the necessary prerequisites.

## Hardware

Verify that your machine meets the following hardware prerequisites.

### Compute

The AlphaFold2 NIM is configured to run on a single GPU. To run the AlphaFold2 NIM successfully for small sequences, the following compute specifications are required:

- **CPU**: A CPU with at least 24 available cores.
- **GPU**: One NVIDIA GPU with at least 32 GB of VRAM and compute capability 8.0 or higher.
- **RAM**: At least 64 GB.
- **Storage**: At least 1,250 GB of free SSD drive space.

<Note>
The AlphaFold2 NIM requires at least 1,250 GB of free SSD space to store the MSA databases required by the endpoints it exposes. Runtime expectations are in [Performance](/nim/bionemo/alphafold2/performance).
</Note>

### Production Hardware

For optimum performance on long sequences and multiple MSA databases, use the recommended configuration.

| Resource | Minimum | Recommended |
| --- | --- | --- |
| **CPU** | 24 cores | 36+ cores |
| **GPU** | NVIDIA GPU with at least 32 GB of VRAM, compute capability 8.0 or higher | NVIDIA A100 80GB |
| **RAM** | 64 GB | 128 GB |
| **Storage** | 1,250 GB free SSD | 1,250 GB free fast NVMe SSD |

## Software

Install the following software dependencies.

### Operating System

The AlphaFold2 NIM runs as a Docker container with NVIDIA GPU access. The NGC CLI setup steps in this guide target AMD64 (x86_64) Linux.


### Runtime Dependencies

Begin with [Docker Engine](https://docs.docker.com/engine/), then install the following runtime dependencies at the previously listed minimum versions:

| Requirement | Minimum Version | Install |
| --- | --- | --- |
| Docker | 23.0.1 | [Install Docker](https://docs.docker.com/engine/install/) |
| NVIDIA Drivers | 535 | [Install NVIDIA Drivers](https://www.nvidia.com/en-us/drivers/) |
| NVIDIA Container Toolkit | 1.13.5 | [Install the NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-the-nvidia-container-toolkit) |
| NGC CLI | 3.41.1 | [Download the NGC CLI tool](https://org.ngc.nvidia.com/setup/installers/cli) |

Verify that your container runtime supports NVIDIA GPUs by running the following command:

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

Example output:

```bash
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.78.01    Driver Version: 525.78.01    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| 41%   30C    P8     1W / 260W |   2244MiB / 11264MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

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

<Note>
For more information on enumerating multi-GPU systems, refer to the NVIDIA Container Toolkit [GPU enumeration](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#gpu-enumeration) topic.
</Note>

## Verified Configurations

The AlphaFold2 NIM is supported on the following configurations.

| Operating System | Architecture | GPU | Status |
| --- | --- | --- | --- |
| Linux | x86_64 | NVIDIA A100 80GB | Supported |
| Linux | x86_64 | NVIDIA GPU with at least 32 GB of VRAM, compute capability 8.0 or higher | Supported |


## Network Access

The AlphaFold2 NIM pulls its container image and model weights from NVIDIA NGC, so the host needs outbound network access to `nvcr.io` and an NGC account.

### External API Service Access

Complete the following NGC setup to gain the access the NIM needs.

**NGC (NVIDIA GPU Cloud) account**

1. [Create an account on NGC](https://catalog.ngc.nvidia.com/).
2. [Generate an API Key](https://org.ngc.nvidia.com/setup/api-key).
3. Log in to the NVIDIA container registry with your NGC API key:

```bash
docker login nvcr.io --username='$oauthtoken' --password=${NGC_API_KEY}
```

**NGC CLI Tool**

1. Download the [NGC CLI tool](https://org.ngc.nvidia.com/setup/installers/cli) for your OS.

<Warning>
Use NGC CLI version `3.41.1` or newer. Here is the command to install this on AMD64 Linux in your home directory:
</Warning>

```bash
wget --content-disposition https://api.ngc.nvidia.com/v2/resources/nvidia/ngc-apps/ngc_cli/versions/3.41.3/files/ngccli_linux.zip -O ~/ngccli_linux.zip && \
unzip ~/ngccli_linux.zip -d ~/ngc && \
chmod u+x ~/ngc/ngc-cli/ngc && \
echo "export PATH=\"\$PATH:~/ngc/ngc-cli\"" >> ~/.bash_profile && source ~/.bash_profile
```

2. Set up your NGC CLI tool locally (you will need your API key for this):

```bash
ngc config set
```

<Note>
After you enter your API key, you might see multiple options for the org and team. Select as desired or press Enter to accept the default.
</Note>

3. Log in to NGC with Docker and set the `NGC_API_KEY` environment variable to pull images:

```bash
docker login nvcr.io
Username: $oauthtoken
Password: <Enter your NGC key here>
```

Then set the `NGC_API_KEY` variable in your shell:

```bash
export NGC_API_KEY=<Enter your NGC key here>
```

4. Set up your NIM cache.

The NIM cache allows you to download models and store previously-downloaded models so that you do not need to download them again later when you run the NIM again. The NIM cache must be readable and writable by the NIM, so in addition to creating the directory, the permissions on this directory need to be set to globally readable and writable. Set up the NIM cache directory as follows:

```bash
## Create the NIM cache directory
mkdir -p ~/.cache/nim

## Set the NIM cache directory permissions to the correct values
chmod -R 777 ~/.cache/nim
```

## Pre-Installation Checklist

Review the following checklist before deploying the AlphaFold2 NIM:

- [ ] Confirm one NVIDIA GPU with at least 32 GB of VRAM and compute capability 8.0 or higher is available.
- [ ] Confirm at least 64 GB of RAM is available.
- [ ] Confirm at least 24 CPU cores are available.
- [ ] Confirm at least 1,250 GB of free SSD space is available.
- [ ] Confirm Docker 23.0.1 or later, NVIDIA Driver 535 or later, and NVIDIA Container Toolkit 1.13.5 or later are installed.
- [ ] Confirm the container runtime can see the GPU (`docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi` succeeds).
- [ ] Generate your NGC API key and confirm `docker login nvcr.io` succeeds.
- [ ] Confirm the NIM cache directory exists and is readable and writable.

## Troubleshoot Prerequisites

If you encounter issues verifying your prerequisites, check these common solutions.

<Accordion title="GPU not detected">

```bash
# Check that the driver can see each required GPU
nvidia-smi
```

If no GPU is listed, confirm that the NVIDIA driver (535 or later) is installed and that the host has rebooted since installation.

</Accordion>

<Accordion title="Container runtime cannot access the GPU">

```bash
# Confirm the container runtime exposes the GPU to containers
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
```

If this fails, confirm the NVIDIA Container Toolkit (1.13.5 or later) is installed and the Docker daemon has been restarted.

</Accordion>

<Accordion title="Insufficient disk space">

```bash
# Check available disk space on the NIM cache volume
df -h ~/.cache/nim
```

The AlphaFold2 NIM requires at least 1,250 GB of free SSD space for the MSA databases. Free space or point the NIM cache at a larger volume.

</Accordion>

## Next Steps

When your prerequisites are in place, you are ready to pull the container and download the model. To get started, refer to the [Quickstart Guide](/nim/bionemo/alphafold2/get-started/quickstart-guide).