-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile.ubuntu
100 lines (86 loc) · 2.63 KB
/
Dockerfile.ubuntu
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
# Ubuntu-based Docker build
###########################
## Notes ##
# Attempting to do a static build of APBS has previously failed in this Docker image.
# Errors were seen while linking `apbs` having to do with position-independent code.
# This is possibly due to the flags used to build the static Python library.
# Therefore this file defaults to using a shared build (i.e. `APBS_STATIC_BUILD=OFF`).
###########################
# Install base OS
###########################
FROM ubuntu:22.04 AS apbs_base_ubuntu
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
software-properties-common \
build-essential \
dpkg-dev \
unzip \
cmake \
git \
libarpack2-dev \
libf2c2-dev \
libeigen3-dev \
libboost-dev \
python3-all \
python3-all-dev \
python3-pip \
libopenblas-serial-dev \
liblapack-dev \
libsuitesparse-dev \
libsuperlu-dev
###########################
# Install METIS
###########################
FROM apbs_base_ubuntu
RUN git clone https://github.com/Electrostatics/metis-fork.git metis-5.1.0 && \
cd metis-5.1.0 && \
make config prefix=/usr/local && \
make install
###########################
# Install APBS
###########################
FROM apbs_base_ubuntu
ADD . /tmp_source
ARG APBS_STATIC_BUILD=OFF
ARG BLA_VENDOR="OpenBLAS"
ARG BUILD_DOC=ON
ARG BUILD_TOOLS=ON
ARG INSTALL_DIR=/usr/local
ARG RELEASE_TYPE=Debug
ARG ENABLE_PYGBE=ON
ARG ENABLE_BEM=ON
ARG ENABLE_GEOFLOW=ON
#ARG FETK_VERSION="1.9.1"
ARG FETK_VERSION=57195e55351e04ce6ee0ef56a143c996a9aee7e2
ARG ENABLE_iAPBS=ON
ARG ENABLE_OPENMP=OFF
ARG ENABLE_PBAM=OFF
ARG ENABLE_PBSAM=OFF
ARG ENABLE_PYTHON=OFF
ARG ENABLE_TESTS=ON
ARG GET_NanoShaper=ON
ARG PYTHON_VERSION="3.10"
ARG MAKEJOBS="-j"
RUN cd /tmp_source && \
mkdir build && cd build && \
cmake \
-DCMAKE_INSTALL_INCLUDEDIR="include" \
-DBUILD_DOC=${BUILD_DOC} \
-DAPBS_STATIC_BUILD=${APBS_STATIC_BUILD} \
-DBUILD_TOOLS=O${BUILD_TOOLS} \
-DCMAKE_BUILD_TYPE=$RELEASE_TYPE \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DENABLE_PYGBE=${ENABLE_PYGBE} \
-DENABLE_BEM=${ENABLE_BEM} \
-DENABLE_iAPBS=${ENABLE_iAPBS} \
-DENABLE_GEOFLOW=${ENABLE_GEOFLOW} \
-DENABLE_OPENMP=${ENABLE_OPENMP} \
-DENABLE_PBAM=${ENABLE_PBAM} \
-DENABLE_PBSAM=${ENABLE_PBSAM} \
-DENABLE_PYTHON=${ENABLE_PYTHON} \
-DENABLE_TESTS=${ENABLE_TESTS} \
-DFETK_VERSION=${FETK_VERSION} \
-DGET_NanoShaper=${GET_NanoShaper} \
-DPYTHON_VERSION="${PYTHON_VERSION}" \
.. && \
make ${MAKEJOBS} install