Mercurial > repos > galaxy-australia > alphafold2
comparison docker/claremcwhite/Dockerfile @ 1:6c92e000d684 draft
"planemo upload for repository https://github.com/usegalaxy-au/galaxy-local-tools commit a510e97ebd604a5e30b1f16e5031f62074f23e86"
author | galaxy-australia |
---|---|
date | Tue, 01 Mar 2022 02:53:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:7ae9d78b06f5 | 1:6c92e000d684 |
---|---|
1 # Copyright 2021 DeepMind Technologies Limited | |
2 # | |
3 # Licensed under the Apache License, Version 2.0 (the "License"); | |
4 # you may not use this file except in compliance with the License. | |
5 # You may obtain a copy of the License at | |
6 # | |
7 # http://www.apache.org/licenses/LICENSE-2.0 | |
8 # | |
9 # Unless required by applicable law or agreed to in writing, software | |
10 # distributed under the License is distributed on an "AS IS" BASIS, | |
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 # See the License for the specific language governing permissions and | |
13 # limitations under the License. | |
14 | |
15 ARG CUDA_FULL=11.2.2 | |
16 FROM nvidia/cuda:${CUDA_FULL}-cudnn8-runtime-ubuntu20.04 | |
17 # FROM directive resets ARGS, so we specify again (the value is retained if | |
18 # previously set). | |
19 ARG CUDA_FULL | |
20 ARG CUDA=11.2 | |
21 # JAXLIB no longer built for all minor CUDA versions: | |
22 # https://github.com/google/jax/blob/main/CHANGELOG.md#jaxlib-0166-may-11-2021 | |
23 ARG CUDA_JAXLIB=11.1 | |
24 | |
25 # Use bash to support string substitution. | |
26 SHELL ["/bin/bash", "-c"] | |
27 | |
28 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
29 build-essential \ | |
30 cmake \ | |
31 cuda-command-line-tools-${CUDA/./-} \ | |
32 git \ | |
33 hmmer \ | |
34 kalign \ | |
35 tzdata \ | |
36 wget \ | |
37 && rm -rf /var/lib/apt/lists/* | |
38 | |
39 # Compile HHsuite from source. | |
40 RUN git clone --branch v3.3.0 https://github.com/soedinglab/hh-suite.git /tmp/hh-suite \ | |
41 && mkdir /tmp/hh-suite/build | |
42 WORKDIR /tmp/hh-suite/build | |
43 RUN cmake -DCMAKE_INSTALL_PREFIX=/opt/hhsuite .. \ | |
44 && make -j 4 && make install \ | |
45 && ln -s /opt/hhsuite/bin/* /usr/bin \ | |
46 && rm -rf /tmp/hh-suite | |
47 | |
48 # Install Miniconda package manger. | |
49 RUN wget -q -P /tmp \ | |
50 https://repo.anaconda.com/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh \ | |
51 && bash /tmp/Miniconda3-py38_4.9.2-Linux-x86_64.sh -b -p /opt/conda \ | |
52 && rm /tmp/Miniconda3-py38_4.9.2-Linux-x86_64.sh | |
53 | |
54 # Install conda packages. | |
55 ENV PATH="/opt/conda/bin:$PATH" | |
56 RUN conda update -qy conda \ | |
57 && conda install -y -c conda-forge \ | |
58 openmm=7.5.1 \ | |
59 cudatoolkit==${CUDA_FULL} \ | |
60 pdbfixer \ | |
61 pip | |
62 | |
63 COPY . /app/alphafold | |
64 RUN wget -q -P /app/alphafold/alphafold/common/ \ | |
65 https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt | |
66 | |
67 # Install pip packages. | |
68 RUN pip3 install --upgrade pip \ | |
69 && pip3 install -r /app/alphafold/requirements.txt \ | |
70 && pip3 install --upgrade jax jaxlib==0.1.69+cuda${CUDA_JAXLIB/./} -f \ | |
71 https://storage.googleapis.com/jax-releases/jax_releases.html | |
72 | |
73 # Apply OpenMM patch. | |
74 WORKDIR /opt/conda/lib/python3.8/site-packages | |
75 RUN patch -p0 < /app/alphafold/docker/openmm.patch | |
76 | |
77 # We need to run `ldconfig` first to ensure GPUs are visible, due to some quirk | |
78 # with Debian. See https://github.com/NVIDIA/nvidia-docker/issues/1399 for | |
79 # details. | |
80 # ENTRYPOINT does not support easily running multiple commands, so instead we | |
81 # write a shell script to wrap them up. | |
82 WORKDIR /app/alphafold | |
83 RUN echo $'#!/bin/bash\n\ | |
84 ldconfig\n\ | |
85 python /app/alphafold/run_alphafold.py "$@"' > /app/run_alphafold.sh \ | |
86 && chmod +x /app/run_alphafold.sh | |
87 ENTRYPOINT ["/app/run_alphafold.sh"] |