Mercurial > repos > galaxy-australia > alphafold2
view 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 |
line wrap: on
line source
# Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ARG CUDA_FULL=11.2.2 FROM nvidia/cuda:${CUDA_FULL}-cudnn8-runtime-ubuntu20.04 # FROM directive resets ARGS, so we specify again (the value is retained if # previously set). ARG CUDA_FULL ARG CUDA=11.2 # JAXLIB no longer built for all minor CUDA versions: # https://github.com/google/jax/blob/main/CHANGELOG.md#jaxlib-0166-may-11-2021 ARG CUDA_JAXLIB=11.1 # Use bash to support string substitution. SHELL ["/bin/bash", "-c"] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential \ cmake \ cuda-command-line-tools-${CUDA/./-} \ git \ hmmer \ kalign \ tzdata \ wget \ && rm -rf /var/lib/apt/lists/* # Compile HHsuite from source. RUN git clone --branch v3.3.0 https://github.com/soedinglab/hh-suite.git /tmp/hh-suite \ && mkdir /tmp/hh-suite/build WORKDIR /tmp/hh-suite/build RUN cmake -DCMAKE_INSTALL_PREFIX=/opt/hhsuite .. \ && make -j 4 && make install \ && ln -s /opt/hhsuite/bin/* /usr/bin \ && rm -rf /tmp/hh-suite # Install Miniconda package manger. RUN wget -q -P /tmp \ https://repo.anaconda.com/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh \ && bash /tmp/Miniconda3-py38_4.9.2-Linux-x86_64.sh -b -p /opt/conda \ && rm /tmp/Miniconda3-py38_4.9.2-Linux-x86_64.sh # Install conda packages. ENV PATH="/opt/conda/bin:$PATH" RUN conda update -qy conda \ && conda install -y -c conda-forge \ openmm=7.5.1 \ cudatoolkit==${CUDA_FULL} \ pdbfixer \ pip COPY . /app/alphafold RUN wget -q -P /app/alphafold/alphafold/common/ \ https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt # Install pip packages. RUN pip3 install --upgrade pip \ && pip3 install -r /app/alphafold/requirements.txt \ && pip3 install --upgrade jax jaxlib==0.1.69+cuda${CUDA_JAXLIB/./} -f \ https://storage.googleapis.com/jax-releases/jax_releases.html # Apply OpenMM patch. WORKDIR /opt/conda/lib/python3.8/site-packages RUN patch -p0 < /app/alphafold/docker/openmm.patch # We need to run `ldconfig` first to ensure GPUs are visible, due to some quirk # with Debian. See https://github.com/NVIDIA/nvidia-docker/issues/1399 for # details. # ENTRYPOINT does not support easily running multiple commands, so instead we # write a shell script to wrap them up. WORKDIR /app/alphafold RUN echo $'#!/bin/bash\n\ ldconfig\n\ python /app/alphafold/run_alphafold.py "$@"' > /app/run_alphafold.sh \ && chmod +x /app/run_alphafold.sh ENTRYPOINT ["/app/run_alphafold.sh"]