-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
executable file
·75 lines (67 loc) · 2.13 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
FROM debian:buster-slim AS rdkit-build-env
RUN apt-get update \
&& apt-get install -yq --no-install-recommends \
ca-certificates \
build-essential \
cmake \
wget \
libboost-dev \
libboost-iostreams-dev \
libboost-python-dev \
libboost-regex-dev \
libboost-serialization-dev \
libboost-system-dev \
libboost-thread-dev \
libcairo2-dev \
libeigen3-dev \
python3-dev \
python3-numpy \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG RDKIT_VERSION=Release_2020_03_2
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
RUN mkdir /rdkit/build
WORKDIR /rdkit/build
RUN cmake -Wno-dev \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D Boost_NO_BOOST_CMAKE=ON \
-D PYTHON_EXECUTABLE=/usr/bin/python3 \
-D RDK_BUILD_AVALON_SUPPORT=ON \
-D RDK_BUILD_CAIRO_SUPPORT=ON \
-D RDK_BUILD_CPP_TESTS=OFF \
-D RDK_BUILD_INCHI_SUPPORT=ON \
-D RDK_BUILD_FREESASA_SUPPORT=ON \
-D RDK_INSTALL_INTREE=OFF \
-D RDK_INSTALL_STATIC_LIBS=OFF \
..
RUN make -j $(nproc) \
&& make install
FROM debian:buster-slim AS rdkit-env
# Install runtime dependencies
RUN apt-get update \
&& apt-get install -yq --no-install-recommends \
libboost-atomic1.67.0 \
libboost-chrono1.67.0 \
libboost-date-time1.67.0 \
libboost-iostreams1.67.0 \
libboost-python1.67.0 \
libboost-regex1.67.0 \
libboost-serialization1.67.0 \
libboost-system1.67.0 \
libboost-thread1.67.0 \
libcairo2-dev \
python3-dev \
python3-numpy \
python3-cairo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy rdkit installation from rdkit-build-env
COPY --from=rdkit-build-env /usr/lib/libRDKit* /usr/lib/
COPY --from=rdkit-build-env /usr/lib/cmake/rdkit/* /usr/lib/cmake/rdkit/
COPY --from=rdkit-build-env /usr/share/RDKit /usr/share/RDKit
COPY --from=rdkit-build-env /usr/include/rdkit /usr/include/rdkit
COPY --from=rdkit-build-env /usr/lib/python3/dist-packages/rdkit /usr/lib/python3/dist-packages/rdkit