# Docker command


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Setup

## Command

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

------------------------------------------------------------------------

<a
href="https://github.com/sky1ove/af_kit/blob/main/af_kit/docker.py#L10"
target="_blank" style="float:right; font-size:smaller">source</a>

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

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

Single json file:

``` python
# 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:

``` python
# 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

------------------------------------------------------------------------

<a
href="https://github.com/sky1ove/af_kit/blob/main/af_kit/docker.py#L85"
target="_blank" style="float:right; font-size:smaller">source</a>

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

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

``` python
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

------------------------------------------------------------------------

<a
href="https://github.com/sky1ove/af_kit/blob/main/af_kit/docker.py#L95"
target="_blank" style="float:right; font-size:smaller">source</a>

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

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

``` python
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

------------------------------------------------------------------------

<a
href="https://github.com/sky1ove/af_kit/blob/main/af_kit/docker.py#L104"
target="_blank" style="float:right; font-size:smaller">source</a>

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

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

``` python
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

------------------------------------------------------------------------

<a
href="https://github.com/sky1ove/af_kit/blob/main/af_kit/docker.py#L114"
target="_blank" style="float:right; font-size:smaller">source</a>

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

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

``` python
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
