-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (48 loc) · 2.89 KB
/
Dockerfile
File metadata and controls
59 lines (48 loc) · 2.89 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
# Metainformation.
# This Dockerfile was adapted from the original OpenFold Dockerfile.
LABEL org.opencontainers.image.version = "1.0.0"
LABEL org.opencontainers.image.authors = "Gustaf Ahdritz"
LABEL org.opencontainers.image.source = "https://github.com/aqlaboratory/openfold"
LABEL org.opencontainers.image.licenses = "Apache License 2.0"
LABEL org.opencontainers.image.base.name="docker.io/nvidia/cuda:10.2-cudnn8-runtime-ubuntu18.04"
RUN apt-key del 7fa2af80
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-get update && apt-get install -y wget curl unzip libxml2 rsync cuda-minimal-build-11-3 libcusparse-dev-11-3 libcublas-dev-11-3 libcusolver-dev-11-3 git
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install
RUN wget -P /tmp \
"https://github.com/conda-forge/miniforge/releases/download/23.3.1-1/Miniforge3-Linux-x86_64.sh" \
&& bash /tmp/Miniforge3-Linux-x86_64.sh -b -p /opt/conda \
&& rm /tmp/Miniforge3-Linux-x86_64.sh
ENV PATH /opt/conda/bin:$PATH
# Clone the repository and submodules.
WORKDIR /opt
RUN git clone https://github.com/aqlaboratory/openfold.git openfold \
&& cd openfold \
&& git checkout f6c875b3c8e3e873a932cbe3b31f94ae011f6fd4 \
&& git submodule update --init --recursive
# Installing with mamba packages that cannot be installed with uv.
COPY environment.yml /opt/openfold/environment.yml
RUN mamba env update -n base --file /opt/openfold/environment.yml && mamba clean --all
ENV LD_LIBRARY_PATH=/opt/conda/lib:${LD_LIBRARY_PATH}
# Install pip packages with uv.
COPY requirements.txt /opt/openfold/requirements.txt
RUN uv pip install --extra-index-url https://download.pytorch.org/whl/cu113 torch==1.12.1+cu113 --system
RUN uv pip install -r /opt/openfold/requirements.txt --system && uv pip install git+https://github.com/NVIDIA/dllogger.git \
git+https://github.com/Dao-AILab/flash-attention.git@5b838a8 --no-deps --no-build-isolation --system
# Download the AlphaFold and CFold parameters.
RUN /opt/openfold/scripts/download_alphafold_params.sh /opt/openfold/openfold/resources/
RUN wget https://zenodo.org/records/10517910/files/params10000.npy -O /opt/openfold/openfold/resources/params/params_cfold.npz
RUN wget -q -P /opt/openfold/openfold/resources \
https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
# Copy relevant files.
COPY config /opt/openfold/config
COPY foldconfbench/ /opt/openfold/
COPY setup.py /opt/openfold/
COPY patches/openfold.patch /opt/openfold.patch
WORKDIR /opt/openfold
RUN patch -p1 < /opt/openfold.patch
RUN python3 setup.py install