- Notifications
You must be signed in to change notification settings - Fork13
Singularity recipe for AlphaFold
License
prehensilecode/alphafold_singularity
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
NOTICE: THIS CODEBASE IS NOT ACTIVELY MAINTAINTED; NO ISSUES WILL BE ADDRESSED
Singularity recipe forAlphaFold, with example Slurm job script.
This splits off my pull requestgoogle-deepmind/alphafold#166
Disclaimer: this project is not affiliated with DeepMind.
Themain
branch here is not directly usable with themain
branch of AlphaFold. This Singularity recipeworks only with the matching release of AlphaFold. Please use one of the releases here, with a matchingrelease of AlphaFold (ignoring the bugfix number).
N.B.google-deepmind/alphafold#510 (comment)
A prebuilt image is hosted on cloud.sylabs.io:https://cloud.sylabs.io/library/prehensilecode/alphafold_singularity/alphafold
Singularity.def
which is the recipe to build the Singularity image. This is a port of theDockerfile provided by AlphaFold.run_singularity.py
which is a port of therun_docker.py
script provided by AlphaFold. It is a wrapper to provide a friendly interface for running the container.
N.B. The AlphaFold version and the alphafold_singularity versions must match,except for the bugfix number in alphafold_singularity. E.g. alphafold_singularity 2.3.2-1goes with AlphaFold 2.3.2
$ export ALPHAFOLD_VERSION=2.3.2$ wget https://github.com/deepmind/alphafold/archive/refs/tags/v${ALPHAFOLD_VERSION}.tar.gz -O alphafold-${ALPHAFOLD_VERSION}.tar.gz...2023-02-08 17:28:50 (1.24 MB/s) - ‘alphafold-x.x.x.tar.gz’ saved [5855095]$ tar -xvf alphafold-${ALPHAFOLD_VERSION}.tar.gz$ cd alphafold-${ALPHAFOLD_VERSION}$ wget https://github.com/prehensilecode/alphafold_singularity/archive/refs/tags/v${ALPHAFOLD_VERSION}.tar.gz -O alphafold_singularity-${ALPHAFOLD_VERSION}.tar.gz...2023-02-08 17:42:18 (1.58 MB/s) - ‘alphafold_singularity-x.x.x.tar.gz’ saved [10148]$ tar -xf alphafold_singularity-${ALPHAFOLD_VERSION}.tar.gz$ mv alphafold_singularity-${ALPHAFOLD_VERSION} singularity$ python3 -m pip install -r singularity/requirements.txt$ sudo singularity build alphafold.sif singularity/Singularity.def
First install the Python requirements:
$ python3 -m pip install -r singularity/requirements.txt
Then, build the Singularity image:
$ sudo singularity build alphafold.sif singularity/Singularity.def
If your/tmp
directory is small, you may need to set theSINGULARITY_TMPDIR
environment variable to a directory on a filesystem with more free space.My builds have consumed up to 15 GiB of space. The resulting image file may be up to 10 GiB.
SeeAlphaFold 2.3.2 READMEfor instructions on downloading genetic databases. These are necessaryto run AlphaFold.
This step requiresaria2c.
N.B. The difference between downloading the "reduced databases" as opposedto the "full databases" is that the reduced databases download "small BFD"instead of "BFD".
To run, modify the$ALPHAFOLD_SRC/singularity/run_singularity.py
and change thesection markedUSER CONFIGURATION
. At the least, you will need to modify the valuesof:
singularity_image
- absolute path to thealphafold.sif
Singularity image
E.g.
#### USER CONFIGURATION ##### AlphaFold Singularity image.singularity_image = Client.load(os.path.join(os.environ['ALPHAFOLD_DIR'], 'alphafold.sif'))
Currently, this project only supports Slurm. Please open an issue to requestsupport for other job schedulers/resource managers.
See the example job scriptexample_slurm_job.sh
.N.B. this example must be modified to suit your specific HPC environment.
Therun_singularity.py
script will use all GPUs available to the job. IfSlurm has been set up withcgroups
,the job may request fewer than the total number of GPUs installed on a node.E.g. if the GPU nodes in the cluster have 4 GPU devices each, the job cando
#SBATCH --gpus=2
and AlphaFold Singularity will use only two of the four GPUs. This isbecause thecgroup
for the job only shows 2 GPUs to the job.
About
Singularity recipe for AlphaFold
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.