-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
88 lines (78 loc) · 2.37 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
80
81
82
83
84
85
86
87
88
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
LABEL maintainer="[email protected]"
# ========== Install required packages ==========
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
software-properties-common \
cmake \
git \
wget \
curl \
unzip \
openssh-server \
tmux \
libffi-dev \
python2.7 \
python2.7-dev \
python-pip \
tmux \
less \
zip && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN pip --no-cache-dir install --upgrade pip && \
pip2.7 --no-cache-dir install setuptools && \
pip2.7 --no-cache-dir install \
numpy \
pandas \
scipy \
sklearn \
jupyter \
matplotlib \
lmdb \
PyMySQL \
networkx \
protobuf \
mxnet-cu90==1.3.1b20181004
# ========== Build RDKit from source ==========
# Install required dependences
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
libboost-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-serialization-dev \
libboost-python-dev \
libboost-regex-dev \
libcairo2-dev \
libeigen3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Download from github
ARG RDKIT_VERSION=Release_2018_03_3
RUN wget --quiet https://github.com/rdkit/rdkit/archive/${RDKIT_VERSION}.tar.gz && \
tar -xzf ${RDKIT_VERSION}.tar.gz && \
mv rdkit-${RDKIT_VERSION} rdkit && \
rm ${RDKIT_VERSION}.tar.gz
# Configure environment variables
ENV RDBASE=$PWD/rdkit
ENV LD_LIBRARY_PATH=${RDBASE}/lib:${LD_LIBRARY_PATH}
ENV PYTHONPATH=${RDBASE}:${PYTHONPATH}
# Install
RUN mkdir rdkit/build && cd rdkit/build && \
cmake -D RDK_BUILD_PYTHON_WRAPPERS=ON \
-D PYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so \
-D PYTHON_INCLUDE_DIR=/usr/include/python2.7/ \
-D PYTHON_EXECUTABLE=/usr/bin/python2.7 \
.. && \
make -j $(nproc) && \
# make && \
make install
# ========== Configure jupyter notebook ==========
RUN mkdir /notebooks && chmod a+rwx /notebooks
RUN mkdir /.local && chmod a+rwx /.local
EXPOSE 8888
# ========== Configure entrypoint ==========
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]