forked from SeisSol/Training
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
178 lines (156 loc) · 6.19 KB
/
Dockerfile
File metadata and controls
178 lines (156 loc) · 6.19 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
FROM debian:bullseye-slim
RUN apt-get update \
&& apt-get install -y \
wget \
ca-certificates \
bzip2 \
gcc \
g++ \
gfortran \
make \
cmake \
libnuma-dev \
libnuma1 \
libopenblas-dev \
libopenmpi-dev \
libocct-data-exchange-7.5 \
libocct-data-exchange-dev \
libocct-modeling-algorithms-7.5 \
libocct-modeling-algorithms-dev \
libocct-modeling-data-7.5 \
libocct-modeling-data-dev \
libocct-foundation-7.5 \
libocct-foundation-dev \
libtbb2 \
zlib1g-dev \
pkg-config \
git \
python3 \
python3-numpy \
libgomp1 \
libopenmpi3 \
libopenblas-base \
libyaml-cpp-dev \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /home/tools
WORKDIR /tmp
RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/src/hdf5-1.10.7.tar.bz2 \
&& tar -xvf hdf5-1.10.7.tar.bz2 \
&& cd hdf5-1.10.7 \
&& CFLAGS="-fPIC" CC=mpicc FC=mpif90 ./configure --enable-parallel --with-zlib --disable-shared --enable-fortran --prefix /home/tools \
&& make -j$(nproc) && make install
RUN wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.4.tar.gz \
&& tar -xvf netcdf-c-4.7.4.tar.gz \
&& cd netcdf-c-4.7.4 \
&& CFLAGS="-fPIC" CC=/home/tools/bin/h5pcc ./configure --enable-shared=no --prefix=/home/tools --disable-dap \
&& make -j$(nproc) && make install
# You need to have a private copy of parmetis-4.0.3.tar.gz
COPY ./parmetis-4.0.3.tar.gz /tmp/parmetis-4.0.3.tar.gz
RUN tar -xvf parmetis-4.0.3.tar.gz \
&& cd parmetis-4.0.3 \
&& sed -i 's/IDXTYPEWIDTH 32/IDXTYPEWIDTH 64/g' ./metis/include/metis.h \
&& CC=mpicc CXX=mpicxx make config prefix=/home/tools \
&& make -j$(nproc) && make install \
&& cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib \
&& cp metis/include/metis.h /home/tools/include
RUN git clone https://github.com/TUM-I5/ASAGI.git \
&& cd ASAGI \
&& git submodule update --init \
&& mkdir build && cd build \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \
&& make -j$(nproc) && make install
RUN git clone https://github.com/uphoffc/ImpalaJIT.git \
&& cd ImpalaJIT \
&& mkdir build && cd build \
&& cmake .. && make -j $(nproc) install
RUN git clone https://github.com/SeisSol/easi \
&& cd easi \
&& mkdir build && cd build \
&& CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=ON .. \
&& make -j$(nproc) && make install
RUN git clone https://github.com/hfp/libxsmm.git \
&& cd libxsmm \
&& git checkout 1.16.1 \
&& make -j$(nproc) generator \
&& cp bin/libxsmm_gemm_generator /home/tools/bin
RUN git clone https://github.com/OSGeo/PROJ.git \
&& cd PROJ && git checkout 4.9.3 \
&& mkdir build && cd build \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \
&& make -j$(nproc) && make install
RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \
&& tar -xf eigen-3.4.0.tar.gz \
&& cd eigen-3.4.0 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \
&& make -j$(nproc) install
RUN git clone https://github.com/SeisSol/SeisSol.git \
&& cd SeisSol \
&& git submodule update --init \
&& mkdir build_hsw && cd build_hsw \
&& export PATH=$PATH:/home/tools/bin \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_PREFIX_PATH=/home/tools -DGEMM_TOOLS_LIST=LIBXSMM -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=4 -DCMAKE_Fortran_FLAGS="-ffast-math -funsafe-math-optimizations" \
&& make -j$(nproc) \
&& cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \
&& make -j$(nproc) \
&& cp SeisSol_* /home/tools/bin
RUN cd SeisSol/preprocessing/science/rconv \
&& mkdir build && cd build \
&& echo "find_package(HDF5 REQUIRED COMPONENTS C HL)" >> ../CMakeLists.txt \
&& echo "target_link_libraries(SeisSol-rconv PUBLIC \${HDF5_C_HL_LIBRARIES} \${HDF5_C_LIBRARIES})" >> ../CMakeLists.txt \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools \
&& make -j$(nproc) && cp rconv /home/tools/bin/
RUN git clone https://github.com/SCOREC/core.git \
&& cd core \
&& git submodule update --init \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release -DSCOREC_CXX_FLAGS="-Wno-error=array-bounds" \
&& make -j$(nproc) && make install
RUN git clone https://github.com/SeisSol/PUMGen.git \
&& cd PUMGen \
&& git submodule update --init \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \
&& make -j$(nproc) && make install
RUN wget https://gmsh.info/src/gmsh-4.8.4-source.tgz \
&& tar -xvf gmsh-4.8.4-source.tgz \
&& cd gmsh-4.8.4-source && mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_BUILD_TYPE=Release -DENABLE_OCC=ON -DENABLE_BUILD_LIB=ON -DENABLE_BUILD_SHARED=ON \
&& make -j$(nproc) && make install
FROM debian:bullseye-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libgomp1 \
libopenmpi3 \
openmpi-bin \
libnuma1 \
libopenblas-base \
libocct-data-exchange-7.5 \
libocct-modeling-algorithms-7.5 \
libocct-modeling-data-7.5 \
libocct-foundation-7.5 \
libtbb2 \
libyaml-cpp-dev \
python3 \
python3-pip \
python3-setuptools \
zlib1g \
libxrender1 \
xvfb \
tini \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /home
COPY --from=0 /home/tools tools
COPY requirements.txt .
RUN python3 -m pip install --upgrade pip && pip3 install -r requirements.txt
ENV PATH=/home/tools/bin:$PATH
ENV OMP_PLACES="cores"
ENV OMP_PROC_BIND="spread"
ENV PYTHONPATH="${PYTHONPATH}:/home/tools/lib"
COPY entrypoint.sh /entrypoint.sh
WORKDIR /home/training
COPY tpv13/ tpv13/
COPY sulawesi/ sulawesi/
COPY northridge/ northridge/
VOLUME ["/shared"]
WORKDIR /shared
ENTRYPOINT ["tini", "-g", "/entrypoint.sh", "--"]