Docker command

Setup

Command

Before running, make sure you have af_model, af_output, af_database folder prepared in the current directory


source

get_docker_command

 get_docker_command (input_dir='af_input', output_dir='af_output',
                     model_dir='af_model', db_dir='af_database',
                     cache_dir='af_cache', gpus=0,
                     docker_name='sky1ove/alphafold3', embedding=False,
                     skip_search=False, search_only=False, json_path=None)

Generate a Docker run command for Alphafold with customizable parameters.

Type Default Details
input_dir str af_input Directory for input data
output_dir str af_output Directory for output results
model_dir str af_model Directory containing models
db_dir str af_database Directory for databases. If None, this option is ommitted
cache_dir str af_cache Directory for JAX compilation cache. If None, this option is omitted
gpus int 0 GPU devices to allocate (e.g., 0,1), if None, ommitted
docker_name str sky1ove/alphafold3 Docker image name
embedding bool False If True, includes the –save_embeddings=true flag
skip_search bool False if MSA is precalculated and present in json; If True, includes the –norun_data_pipeline flag
search_only bool False search MSA only; If True, sets skip_search to False and includes the –norun_inference flag
json_path NoneType None Path to JSON file. If not None, uses json_file instead of input_dir

Single json file:

# for single json file, we don't need to cache the model
get_docker_command(json_path=f"af_input/subfolder/data.json",
                   output_dir="af_output/subfolder",
                   cache_dir=False)
docker run --rm \
    --volume "$HOME/af_input:/root/af_input" \
    --volume "$HOME/af_output/subfolder:/root/af_output" \
    --volume "$HOME/af_model:/root/models" \
    --volume "$HOME/af_database:/root/public_databases" \
    --gpus "device=0" \
    sky1ove/alphafold3 \
    python run_alphafold.py \
    --json_path=/root/af_input/subfolder/data.json \
    --output_dir=/root/af_output \
    --model_dir=/root/models

Input directory with json files:

# For a number of json files in the input folder
get_docker_command(input_dir="af_input/subfolder/folder_0",
                   output_dir="af_output/subfolder")
docker run --rm \
    --volume "$HOME/af_input:/root/af_input" \
    --volume "$HOME/af_output/subfolder:/root/af_output" \
    --volume "$HOME/af_model:/root/models" \
    --volume "$HOME/af_database:/root/public_databases" \
    --volume "$HOME/af_cache:/root/cache" \
    --gpus "device=0" \
    sky1ove/alphafold3 \
    python run_alphafold.py \
    --input_dir=/root/af_input/subfolder/folder_0 \
    --output_dir=/root/af_output \
    --model_dir=/root/models \
    --jax_compilation_cache_dir=/root/cache

Single json full pipeline


source

docker_single_full

 docker_single_full (json_path, output_dir, cache_dir=False,
                     input_dir='af_input', model_dir='af_model',
                     db_dir='af_database', gpus=0,
                     docker_name='sky1ove/alphafold3', embedding=False,
                     skip_search=False, search_only=False)

Single json task with full pipeline.

Type Default Details
json_path NoneType None Path to JSON file. If not None, uses json_file instead of input_dir
output_dir str af_output Directory for output results
cache_dir str af_cache Directory for JAX compilation cache. If None, this option is omitted
input_dir str af_input Directory for input data
model_dir str af_model Directory containing models
db_dir str af_database Directory for databases. If None, this option is ommitted
gpus int 0 GPU devices to allocate (e.g., 0,1), if None, ommitted
docker_name str sky1ove/alphafold3 Docker image name
embedding bool False If True, includes the –save_embeddings=true flag
skip_search bool False if MSA is precalculated and present in json; If True, includes the –norun_data_pipeline flag
search_only bool False search MSA only; If True, sets skip_search to False and includes the –norun_inference flag
docker_single_full('a.json','output_folder')
docker run --rm \
    --volume "$HOME/a.json:/root/af_input" \
    --volume "$HOME/output_folder:/root/af_output" \
    --volume "$HOME/af_model:/root/models" \
    --volume "$HOME/af_database:/root/public_databases" \
    --gpus "device=0" \
    sky1ove/alphafold3 \
    python run_alphafold.py \
    --json_path=/root/af_input/ \
    --output_dir=/root/af_output \
    --model_dir=/root/models

Folder input

Full pipeline


source

docker_multi_full

 docker_multi_full (input_dir, output_dir, model_dir='af_model',
                    db_dir='af_database', cache_dir='af_cache', gpus=0,
                    docker_name='sky1ove/alphafold3', embedding=False,
                    skip_search=False, search_only=False, json_path=None)

Folder of json as input with full pipeline.

Type Default Details
input_dir str af_input Directory for input data
output_dir str af_output Directory for output results
model_dir str af_model Directory containing models
db_dir str af_database Directory for databases. If None, this option is ommitted
cache_dir str af_cache Directory for JAX compilation cache. If None, this option is omitted
gpus int 0 GPU devices to allocate (e.g., 0,1), if None, ommitted
docker_name str sky1ove/alphafold3 Docker image name
embedding bool False If True, includes the –save_embeddings=true flag
skip_search bool False if MSA is precalculated and present in json; If True, includes the –norun_data_pipeline flag
search_only bool False search MSA only; If True, sets skip_search to False and includes the –norun_inference flag
json_path NoneType None Path to JSON file. If not None, uses json_file instead of input_dir
docker_multi_full('input_folder','output_folder')
docker run --rm \
    --volume "$HOME/input_folder:/root/af_input" \
    --volume "$HOME/output_folder:/root/af_output" \
    --volume "$HOME/af_model:/root/models" \
    --volume "$HOME/af_database:/root/public_databases" \
    --volume "$HOME/af_cache:/root/cache" \
    --gpus "device=0" \
    sky1ove/alphafold3 \
    python run_alphafold.py \
    --input_dir=/root/af_input \
    --output_dir=/root/af_output \
    --model_dir=/root/models \
    --jax_compilation_cache_dir=/root/cache

MSA only


source

docker_multi_msa

 docker_multi_msa (input_dir, output_dir, search_only=True,
                   model_dir='af_model', db_dir='af_database',
                   cache_dir='af_cache', gpus=0,
                   docker_name='sky1ove/alphafold3', embedding=False,
                   skip_search=False, json_path=None)

MSA search only, without structure inference; CPU only.

Type Default Details
input_dir str af_input Directory for input data
output_dir str af_output Directory for output results
search_only bool False search MSA only; If True, sets skip_search to False and includes the –norun_inference flag
model_dir str af_model Directory containing models
db_dir str af_database Directory for databases. If None, this option is ommitted
cache_dir str af_cache Directory for JAX compilation cache. If None, this option is omitted
gpus int 0 GPU devices to allocate (e.g., 0,1), if None, ommitted
docker_name str sky1ove/alphafold3 Docker image name
embedding bool False If True, includes the –save_embeddings=true flag
skip_search bool False if MSA is precalculated and present in json; If True, includes the –norun_data_pipeline flag
json_path NoneType None Path to JSON file. If not None, uses json_file instead of input_dir
docker_multi_msa('input_folder','output_folder')
docker run --rm \
    --volume "$HOME/input_folder:/root/af_input" \
    --volume "$HOME/output_folder:/root/af_output" \
    --volume "$HOME/af_model:/root/models" \
    --volume "$HOME/af_database:/root/public_databases" \
    --volume "$HOME/af_cache:/root/cache" \
    --gpus "device=0" \
    sky1ove/alphafold3 \
    python run_alphafold.py \
    --input_dir=/root/af_input \
    --output_dir=/root/af_output \
    --model_dir=/root/models \
    --jax_compilation_cache_dir=/root/cache \
    --norun_inference

Infer only


source

docker_multi_infer

 docker_multi_infer (input_dir, output_dir, skip_search=True,
                     model_dir='af_model', db_dir='af_database',
                     cache_dir='af_cache', gpus=0,
                     docker_name='sky1ove/alphafold3', embedding=False,
                     search_only=False, json_path=None)

Infer only with pre-calculated MSA; GPU is needed.

Type Default Details
input_dir str af_input Directory for input data
output_dir str af_output Directory for output results
skip_search bool False if MSA is precalculated and present in json; If True, includes the –norun_data_pipeline flag
model_dir str af_model Directory containing models
db_dir str af_database Directory for databases. If None, this option is ommitted
cache_dir str af_cache Directory for JAX compilation cache. If None, this option is omitted
gpus int 0 GPU devices to allocate (e.g., 0,1), if None, ommitted
docker_name str sky1ove/alphafold3 Docker image name
embedding bool False If True, includes the –save_embeddings=true flag
search_only bool False search MSA only; If True, sets skip_search to False and includes the –norun_inference flag
json_path NoneType None Path to JSON file. If not None, uses json_file instead of input_dir
docker_multi_infer('input_folder','output_folder')
docker run --rm \
    --volume "$HOME/input_folder:/root/af_input" \
    --volume "$HOME/output_folder:/root/af_output" \
    --volume "$HOME/af_model:/root/models" \
    --volume "$HOME/af_database:/root/public_databases" \
    --volume "$HOME/af_cache:/root/cache" \
    --gpus "device=0" \
    sky1ove/alphafold3 \
    python run_alphafold.py \
    --input_dir=/root/af_input \
    --output_dir=/root/af_output \
    --model_dir=/root/models \
    --jax_compilation_cache_dir=/root/cache \
    --norun_data_pipeline

End