File: Dockerfile.centos

package info (click to toggle)
apbs 3.4.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 199,188 kB
  • sloc: ansic: 284,988; cpp: 60,416; fortran: 44,896; xml: 13,895; sh: 13,838; python: 8,105; yacc: 2,922; makefile: 1,428; f90: 989; objc: 448; lex: 294; awk: 266; sed: 205; java: 134; csh: 79
file content (112 lines) | stat: -rw-r--r-- 3,430 bytes parent folder | download | duplicates (3)
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
110
111
112
# CentOS-based Docker build
###########################

## Notes ##

# SCL is needed for devtoolset, so we can have a more advanced GCC than v4.8.5.
# GCC 4.8.5 was unable to compile:
#   - GoogleTest
#   - Some C99 for-loop convention used in routines.c

# Note that because SCL's devtoolset is used:
#   - LD_LIBRARY_PATH is set to only include devtoolset paths; if you install APBS in e.g. /usr/local, 
#     then you'll need to add /usr/local/lib64 and /usr/local/lib to LD_LIBRARY_PATH *after* the current contents:
#     > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64:/usr/local/lib

# Note that this build is rather sensitive to the Python3 version
# In particular, the include directory and library are explicitly specified and version dependent.

FROM centos:7 AS apbs_base_centos

RUN yum -y install \
        epel-release \
        centos-release-scl && \
    yum-config-manager --enable rhel-server-rhscl-7-rpms && \
    yum -y install devtoolset-11 && \
    source scl_source enable devtoolset-11 && \
    yum -y install \
        unzip \
        cmake3 \
        git \
        wget \
        arpack-devel \
        arpack-static \
        f2c \
        eigen3-devel \
        boost-devel \
        python3-pip \
        python3-devel \
        openblas-serial64 \
        openblas-static \
        openblas-devel \
        lapack64-devel \
        lapack64-static \
        suitesparse-devel \
        suitesparse-static \
        && \
    ln -s /usr/bin/cmake3 /usr/local/bin/cmake && \
    wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz && \
    gunzip metis-5.1.0.tar.gz && \
    tar -xf metis-5.1.0.tar && \
    cd metis-5.1.0 && \
    make config prefix=/usr/local && \
    make install && \
    /bin/true


#########################################

FROM apbs_base_centos

ADD . /tmp_source

ARG BLA_VENDOR="OpenBLAS"
ARG BUILD_DOC=ON
ARG APBS_STATIC_BUILD=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.6"
ARG PYTHON3_INCLUDE_DIR="/usr/include/python3.6m"
ARG PYTHON3_LIBRARY="/usr/lib64/libpython3.6m.so"
ARG MAKEJOBS="-j"

RUN source scl_source enable devtoolset-11 && \
    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}" \
      -DPython3_INCLUDE_DIR=${PYTHON3_INCLUDE_DIR} \
      -DPython3_LIBRARY=${PYTHON3_LIBRARY} \
      .. && \
    make ${MAKEJOBS} install && \
    /bin/true