File: Dockerfile_1_deps

package info (click to toggle)
rdkit 202503.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 222,024 kB
  • sloc: cpp: 411,111; python: 78,482; ansic: 26,181; java: 8,285; javascript: 4,404; sql: 2,393; yacc: 1,626; lex: 1,267; cs: 1,090; makefile: 580; xml: 229; fortran: 183; sh: 121
file content (109 lines) | stat: -rw-r--r-- 3,685 bytes parent folder | download | duplicates (2)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Example usage of this Dockerfile:
# (the --build-arg arguments are all optional)
#
# 1. cd to Code/MinimalLib/docker
# cd Code/MinimalLib/docker
#
# 2. build the MinimalLib rdkit-minimallib-deps image:
# docker build --target deps-stage -t rdkit-minimallib-deps \
#   --build-arg http_proxy=$HTTP_PROXY \
#   --build-arg https_proxy=$HTTP_PROXY \
#   --network=host --build-arg "EXCEPTION_HANDLING=-fwasm-exceptions" \
#   -f Dockerfile_1_deps .


ARG EMSDK_VERSION="latest"
ARG EXCEPTION_HANDLING="-fexceptions -sNO_DISABLE_EXCEPTION_CATCHING"
ARG BOOST_MAJOR_VERSION="1"
ARG BOOST_MINOR_VERSION="87"
ARG BOOST_PATCH_VERSION="0"
ARG BOOST_DOT_VERSION
ARG BOOST_UNDERSCORE_VERSION
ARG FREETYPE_VERSION="2.13.3"
ARG ZLIB_VERSION="1.3.1"
ARG http_proxy
ARG https_proxy

FROM debian:bookworm AS deps-stage
ARG EMSDK_VERSION
ARG EXCEPTION_HANDLING
ARG RDKIT_GIT_URL
ARG RDKIT_BRANCH
ARG BOOST_MAJOR_VERSION
ARG BOOST_MINOR_VERSION
ARG BOOST_PATCH_VERSION
ARG FREETYPE_VERSION
ARG ZLIB_VERSION
ARG http_proxy
ARG https_proxy

LABEL maintainer="Greg Landrum <greg.landrum@t5informatics.com>"

RUN [ -n "${http_proxy}" ] && echo "export http_proxy=${http_proxy}" >> ~/.bashrc || true
RUN [ -n "${https_proxy}" ] && echo "export https_proxy=${https_proxy}" >> ~/.bashrc || true
SHELL ["/bin/bash", "-c", "-l"]
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get upgrade -y && apt install -y \
  curl \
  wget \
  cmake \
  python3 \
  g++ \
  libeigen3-dev \
  git \
  xz-utils \
  nodejs

# If you are in an organization, put your organization certs inside
# the certs directory otherwise HTTPS might not work
COPY certs /usr/local/share/ca-certificates/
RUN update-ca-certificates

ENV LANG C

WORKDIR /opt
RUN git clone https://github.com/emscripten-core/emsdk.git

WORKDIR /src
ARG BOOST_DOT_VERSION="${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_PATCH_VERSION}"
ARG BOOST_UNDERSCORE_VERSION="${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_PATCH_VERSION}"
RUN wget -q https://archives.boost.io/release/${BOOST_DOT_VERSION}/source/boost_${BOOST_UNDERSCORE_VERSION}.tar.gz && \
  tar xzf boost_${BOOST_UNDERSCORE_VERSION}.tar.gz
WORKDIR /src/boost_${BOOST_UNDERSCORE_VERSION}
RUN ./bootstrap.sh --prefix=/opt/boost --with-libraries=system && \
  ./b2 install

WORKDIR /opt/emsdk
RUN ./emsdk install ${EMSDK_VERSION} && \
  ./emsdk activate ${EMSDK_VERSION}

#RUN source ./emsdk_env.sh

RUN echo "source /opt/emsdk/emsdk_env.sh > /dev/null 2>&1" >> ~/.bashrc

WORKDIR /src
RUN wget -q https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
  tar xzf freetype-${FREETYPE_VERSION}.tar.gz
WORKDIR /src/freetype-${FREETYPE_VERSION}
RUN mkdir build
WORKDIR /src/freetype-${FREETYPE_VERSION}/build
RUN emcmake cmake -DCMAKE_BUILD_TYPE=Release \
  -DFT_DISABLE_ZLIB=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_PNG=TRUE \
  -DFT_DISABLE_HARFBUZZ=TRUE -DFT_DISABLE_BROTLI=TRUE \
  -DCMAKE_C_FLAGS="${EXCEPTION_HANDLING}" -DCMAKE_EXE_LINKER_FLAGS="${EXCEPTION_HANDLING}" \
  -DCMAKE_INSTALL_PREFIX=/opt/freetype ..
RUN make -j2 && make -j2 install

WORKDIR /src
RUN wget -q https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz && \
  tar xzf zlib-${ZLIB_VERSION}.tar.gz
WORKDIR /src/zlib-${ZLIB_VERSION}
RUN mkdir build
WORKDIR /src/zlib-${ZLIB_VERSION}/build
RUN emcmake cmake -DCMAKE_BUILD_TYPE=Release -DZLIB_BUILD_EXAMPLES=OFF \
  -DCMAKE_C_FLAGS="${EXCEPTION_HANDLING}" -DCMAKE_EXE_LINKER_FLAGS="${EXCEPTION_HANDLING}" \
  -DCMAKE_INSTALL_PREFIX=/opt/zlib ..
RUN make && make install
RUN echo "export BOOST_DOT_VERSION=${BOOST_DOT_VERSION}" >> ~/.bashrc
RUN echo "export BOOST_UNDERSCORE_VERSION=${BOOST_UNDERSCORE_VERSION}" >> ~/.bashrc