forked from gcorso/DiffDock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
65 lines (50 loc) · 2.26 KB
/
Dockerfile
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
60
61
62
63
64
65
FROM nvidia/cuda:11.6.0-cudnn8-devel-ubuntu20.04
ENV TZ=Asia/Hong_Kong
ARG DEBIAN_FRONTEND=noninteractive
RUN chsh -s /bin/bash
SHELL ["/bin/bash", "-c"]
WORKDIR /root/
ARG CACHE_DATE=2023-03-31
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
wget \
bzip2 \
apt-utils \
git \
g++ \
libeigen3-dev \
wget \
cmake \
less \
unzip
RUN apt-get clean
RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
/opt/conda/bin/conda clean -afy
ENV PATH /opt/conda/bin:$PATH
# setup conda virtual environment
COPY ./environment.yml ./environment.yml
RUN conda update conda \
&& conda env create --name diffdock -f ./environment.yml
RUN echo "conda activate diffdock" >> ~/.bashrc
ENV PATH /opt/conda/envs/diffdock/bin:$PATH
ENV CONDA_DEFAULT_ENV $diffdock
#install torch specific packages
RUN pip install --upgrade pip
COPY ./requirements_docker_GPU_oddt.txt ./
RUN pip install --no-cache-dir torch==1.13.0 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
RUN pip install --no-cache-dir -r ./requirements_docker_GPU_oddt.txt
RUN pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
RUN pip install torch-geometric torch-cluster -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
COPY . .
RUN git submodule init
RUN git submodule update
RUN pip install -e ./esm/.
RUN python datasets/esm_embedding_preparation.py --protein_path test/test.pdb --out_file data/prepared_for_esm.fasta && \
HOME=/app/esm/model_weights python esm/scripts/extract.py esm2_t33_650M_UR50D data/prepared_for_esm.fasta data/esm2_output --repr_layers 33 --include per_tok && \
python -m inference --protein_path test/test.pdb --ligand test/test.sdf --out_dir /outputs --inference_steps 20 --samples_per_complex 40 --batch_size 10 --actual_steps 18 --no_final_step_noise
CMD ["bash"]