Skip to main content

Prerequisites

Before running AlphaFold 3 with Docker, ensure you have:
1

Linux System

AlphaFold 3 requires Linux. Other operating systems are not supported.
2

NVIDIA GPU

Compute Capability 8.0+ (A100, H100 recommended)
  • A100 80GB: Up to 5,120 tokens
  • H100 80GB: Up to 5,120 tokens
  • A100 40GB: Up to 4,352 tokens (with config changes)
3

System Resources

  • RAM: Minimum 64 GB (genetic search can use more)
  • Disk: Up to 1 TB for databases (SSD recommended)
  • CUDA: Version 12.6 on host machine
4

Docker Installed

Rootless Docker recommended. See installation section below.

Installation

Installing Docker

These instructions are for Ubuntu 22.04 LTS. Adjust for your distribution.
Add Docker’s official GPG key:
Add repository and install:

Installing NVIDIA GPU Support

1

Install NVIDIA Drivers

If you see “NVIDIA-SMI has failed”, reboot with sudo reboot now
2

Install NVIDIA Container Toolkit

3

Verify GPU Access

You should see your GPU listed.

Obtaining AlphaFold 3 Source Code

Downloading Databases

Download size: ~252 GB compressed, ~630 GB uncompressed. Use SSD for best performance.
Do NOT use a subdirectory of the AlphaFold 3 repository. This would slow Docker builds.
Expected directory structure:

Obtaining Model Parameters

Model parameters require approval. Complete this form. Expect 2-3 business day response.
Download parameters to a directory (e.g., $HOME/af3_models).
Do NOT place in AlphaFold 3 repository directory. Store separately.

Building Docker Image

This creates an image with all Python dependencies and environment configuration.

Running AlphaFold 3

Basic Usage

Create an input JSON file (see Input Format) and save to $HOME/af_input/fold_input.json:
fold_input.json
Run AlphaFold 3:

Directory Mounts Explained

volume
Input JSON files. Must be readable by container.
volume
Output directory for predictions. Must be writable.
volume
Model parameters from Google DeepMind.
volume
Genetic databases for MSA and template search.
You may need to run chmod 755 $HOME/af_input $HOME/af_output to ensure proper permissions.

Multiple Database Directories

For optimal performance with SSD + HDD setup:
AlphaFold 3 checks SSD first, then falls back to slower storage.

Processing Multiple Inputs

Processes all .json files in the input directory.

Common Flags

Pipeline Control

boolean
default:"true"
Run genetic and template search (CPU-only, time-consuming)
boolean
default:"true"
Run model inference (requires GPU)
flag
Skip data pipeline (requires pre-computed MSA/templates in input)
flag
Skip inference (generates MSA/templates only)

Output Control

path
required
Directory for output files
flag
Overwrite existing output directory
boolean
default:"false"
Save single and pair embeddings (~6 GB for 5k tokens)
boolean
default:"false"
Save distogram predictions (~3 GB for 5k tokens)

Performance Flags

list
Compilation bucket sizes (e.g., 256,512,1024,2048,5120)
path
Directory for JAX compilation cache (avoids recompilation)

Database Paths

path
Database directory (can specify multiple times)

Running in Stages

For optimal resource utilization, run data pipeline and inference separately:

Stage 1: Data Pipeline (CPU-only)

This generates <job>_data.json with MSAs and templates.

Stage 2: Inference (GPU required)

This approach allows running genetic search on CPU-only machines, then inference on GPU machines.

Troubleshooting

Permission Errors

GPU Not Detected

Out of Memory

For inputs >5,120 tokens or GPUs with <80GB:Edit docker/Dockerfile and rebuild:

Compilation Issues

For V100 or other Compute Capability 7.x GPUs:

Getting Help

View All Flags

Check Logs

Docker logs are displayed in real-time. Redirect to file:

Next Steps

Singularity

Run AlphaFold 3 with Singularity instead

Performance

Optimize for speed and throughput