forked from chaunceydust/Auto_AutoDock-GPU
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
79 lines (65 loc) · 2.55 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
MAINTAINER Jongseo_Park [email protected]
# Initial setup
RUN rm /etc/apt/sources.list.d/cuda.list \
&& apt-key del 7fa2af80
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& apt-get update \
&& apt-get install -y \
wget \
git \
python3 \
python3-pip \
unzip \
cmake \
tzdata \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Conda setup
RUN wget -q -P /tmp https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda \
&& rm /tmp/Miniconda3-latest-Linux-x86_64.sh \
&& echo '. /opt/conda/etc/profile.d/conda.sh' >> ~/.bashrc \
&& echo 'export PATH="/opt/conda/bin/":$PATH' >> ~/.bashrc \
&& /bin/bash -c "source ~/.bashrc"
# Git clone (auto_autodock-gpu / openbabel / autodock_gpu)
WORKDIR /opt/
RUN git clone https://github.com/jongseo-park/Auto_AutoDock-GPU \
&& git clone https://github.com/ccsb-scripps/AutoDock-GPU \
&& wget https://github.com/openbabel/openbabel/archive/refs/tags/openbabel-2-4-1.tar.gz \
&& wget https://vina.scripps.edu/wp-content/uploads/sites/55/2020/12/autodock_vina_1_1_2_linux_x86.tgz \
&& tar -zxvf openbabel-2-4-1.tar.gz \
&& rm -rf openbabel-2-4-1.tar.gz \
&& tar -zxvf autodock_vina_1_1_2_linux_x86.tgz \
&& rm -rf autodock_vina_1_1_2_linux_x86.tgz \
&& mv autodock_vina_1_1_2_linux_x86 vina
# autodock-gpu setup
WORKDIR /opt/AutoDock-GPU
RUN export GPU_INCLUDE_PATH="/usr/local/cuda/include/" \
&& export GPU_LIBRARY_PATH="/usr/local/cuda/lib64" \
&& make DEVICE=CUDA NUMWI=128 TARGETS="86" \
&& make DEVICE=CUDA NUMWI=256 TARGETS="86" \
&& mv ./bin/autodock_gpu_256wi ./bin/autodock_gpu_256wi_sm86 \
&& mv ./bin/autodock_gpu_128wi ./bin/autodock_gpu_128wi_sm86 \
&& make DEVICE=CUDA NUMWI=128 \
&& make DEVICE=CUDA NUMWI=256
# autodock-vina setup
# openbabel setup
WORKDIR /opt/openbabel-openbabel-2-4-1
RUN mkdir build
WORKDIR /opt/openbabel-openbabel-2-4-1/build
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/opt/openbabel/ \
&& make -j 4 \
&& make install
# Generate conda envs
WORKDIR /opt/Auto_AutoDock-GPU
ENV PATH="/opt/conda/bin:$PATH"
RUN conda env create -f requirements.yml \
&& conda clean --all
# Finalize
WORKDIR /home/run/
RUN echo 'export PATH="/opt/openbabel/bin/":$PATH' >> ~/.bashrc \
&& rm -rf /opt/openbabel-openbabel-2-4-1 \
&& echo "conda activate autodock_gpu" >> ~/.bashrc \