forked from hyoo/alphafold_singularity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalphafold.def
41 lines (31 loc) · 1.83 KB
/
alphafold.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Bootstrap: localimage
From: base.sif
# Build instructions from
# https://github.com/kalininalab/alphafold_non_docker
# Note: Versions of Python packages removed in order to resolve outdated and missing for Python 3.8
%files
run.sh /opt/run.sh
%post
# miniconda setup
cd /opt/
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3
source /opt/miniconda3/etc/profile.d/conda.sh
conda create --name alphafold python=3.8
conda update -n base conda
conda activate alphafold
conda install -y -c conda-forge openmm cudnn cudatoolkit pdbfixer
conda install -y -c bioconda hmmer hhsuite kalign2
# alphafold setup
cd /opt/
git clone https://github.com/deepmind/alphafold.git
# alphafold_path="/opt/alphafold"
wget -q -P alphafold/alphafold/common/ https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
pip install absl-py biopython chex dm-haiku dm-tree immutabledict jax ml-collections numpy pandas scipy tensorflow
pip install --upgrade jax jaxlib -f https://storage.googleapis.com/jax-releases/jax_releases.html
pip install -r alphafold/requirements.txt
# Originally, AlphaFold pins OpenMM to 7.5.1, an old version that is no longer supported.
# It also requires applying a patch (file docker/openmm.patch in the official AlphaFold git repository) related to disulfide bonds.
# Newer versions of OpenMM include that fix and so the patch isn't needed anymore.
# AlphaFold Issues - https://github.com/deepmind/alphafold/issues/404#issue-1172485609
# cd /opt/miniconda3/envs/alphafold/lib/python3.8/site-packages/ && patch -p0 < $alphafold_path/docker/openmm.patch
mv /opt/run.sh /opt/alphafold/run.sh