-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
166 lines (135 loc) · 5.19 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
FROM centos:7
# Container that contains all libraries needed to run OpenImpala
# * Docker integration
# * the steps necessary to enable MPI messaging over IB
# * Build of AMReX libraries
# * Build of Hypre solver
# * HDF5 1.12.0
# * HDF5 C++ API
# * CMake
# Note: the original recipe for enabling MPI messaging over IB is
# * https://community.mellanox.com/docs/DOC-2431
# * This recipe is adapted from M. Dutas hpc-mpi-benchmarks.sif
# maintainer James Le Houx
# version 1.5
#
# --- install compilers
WORKDIR /
RUN yum install -y centos-release-scl-rh
RUN yum install -y devtoolset-9
RUN /bin/bash -c "source /opt/rh/devtoolset-9/enable"
#
# --- install verbs
RUN yum groupinstall -y "Infiniband"
RUN yum install -y libibverbs-devel
RUN yum install -y gcc-c++ gcc-gfortran wget git rh-python36 hostname
RUN yum --enablerepo=extras install -y epel-release
RUN scl enable rh-python36 bash
RUN yum install -y libtiff libtiff-devel python-pip boost169-devel.x86_64
#
# --- install OpenMPI
ENV OPENMPI_VERSION=3.1.4
RUN wget https://download.open-mpi.org/release/open-mpi/v${OPENMPI_VERSION%??}/openmpi-${OPENMPI_VERSION}.tar.gz --no-check-certificate && \
tar -xf openmpi-${OPENMPI_VERSION}.tar.gz
WORKDIR openmpi-${OPENMPI_VERSION}/
RUN ./configure \
--prefix=/usr/local \
--enable-orterun-prefix-by-default \
--enable-mpirun-prefix-by-default \
--with-verbs
RUN make && \
make install
WORKDIR /
# Note: "--with-verbs" is not essential, as ibverbs support is picked up automatically
RUN rm -fr openmpi-${OPENMPI_VERSION}*
#
# --- make OpenMPI libraries /usr/local/lib available
RUN ldconfig
RUN ldconfig /usr/local/lib
#
# --- install cmake
RUN wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz --no-check-certificate && \
tar zxvf cmake-3.*
WORKDIR cmake-3.12.3
RUN ./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install
WORKDIR /src
#
# --- install HDF5
ENV HDF5_VERSION=1.12.0
RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz --no-check-certificate && \
tar -xf hdf5-${HDF5_VERSION}.tar.gz
WORKDIR hdf5-${HDF5_VERSION}
RUN CFLAGS="-O3 -mavx2" CXXFLAGS=${CFLAGS} FCFLAGS=${CFLAGS} && \
CC=`type -p mpicc` FC=`type -p mpif90` && \
./configure \
--prefix=/opt/hdf5-parallel/${HDF5_VERSION} \
--enable-fortran \
--enable-fortran2003 \
--enable-parallel \
--disable-tests
RUN make && \
make install && \
cp -r /src/hdf5-1.12.0/src/ /usr/include/hdf5 && \
cp -r /src/hdf5-1.12.0/hl/src/* /usr/include/hdf5
WORKDIR /src
RUN rm -fr hdf5-${HDF5_VERSION}/ hdf5-${HDF5_VERSION}.tar.gz
ENV ROOT_HDF5=/opt/hdf5-parallel/1.12.0
#
# --- install HDF5 C++ api
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
RUN scl enable rh-python36 bash && \
python3 -m pip --version && \
python3 -m pip install --upgrade pip && \
python3 -m pip install conan
RUN conan config set general.revisions_enabled=True && \
conan remote add ecdc https://artifactoryconan.esss.dk/artifactory/api/conan/ecdc && \
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan && \
git clone -b v0.4.0 --single-branch https://github.com/ess-dmsc/h5cpp.git
WORKDIR h5cpp/build
RUN cmake .. && \
make && \
make install && \
cp -r /src/h5cpp/build/lib/* /usr/lib
WORKDIR /src
#
# --- install amrex
RUN git clone -b 21.02 --single-branch https://github.com/AMReX-Codes/amrex.git
WORKDIR /src/amrex
RUN ./configure --with-mpi yes --with-omp yes --enable-eb yes && \
make && \
make install && \
cp -r /src/amrex/tmp_install_dir/include /usr/include/amrex && \
cp -r /src/amrex/tmp_install_dir/lib/* /usr/lib/
WORKDIR /src
#
# --- install hypre
RUN git clone https://github.com/hypre-space/hypre.git
WORKDIR hypre/src
RUN ./configure && \
make && \
make install && \
cp -r /src/hypre/src/hypre/include /usr/include/hypre && \
cp -r /src/hypre/src/hypre/lib/* /usr/lib
WORKDIR /
RUN rm -rf /src
#
# --- install OpenImpala
RUN git clone https://github.com/kramergroup/openImpala.git
WORKDIR openImpala
RUN make
WORKDIR /
#============================================================#
# environment: PATH, LD_LIBRARY_PATH, etc.
#============================================================#
ENV OPENMPI_VERSION=3.1.4
ENV OPENIMPALA_VERSION=1.0.0
ENV PATH=/opt/openmpi/${OPENMPI_VERSION}/bin:$PATH
ENV PATH=/opt/rh/devtoolset-9/root/usr/bin:${PATH}}
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:${LD_LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:${LD_LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/lib:${LD_LIBRARY_PATH}
ENV LC_ALL=C