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.
- Ubuntu 22.04
- Rootless Setup
Add Docker’s official GPG key:Add repository and install:
Installing NVIDIA GPU Support
1
Install NVIDIA Drivers
2
Install NVIDIA Container Toolkit
3
Verify GPU Access
Obtaining AlphaFold 3 Source Code
Downloading Databases
Do NOT use a subdirectory of the AlphaFold 3 repository. This would slow Docker builds.
Obtaining Model Parameters
Model parameters require approval. Complete this form. Expect 2-3 business day response.
$HOME/af3_models).
Building Docker Image
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
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:Processing Multiple Inputs
- Directory of JSONs
- Batch Script
.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)
<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
- Enable Unified Memory
- Reduce Batch Size
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