Skip to content

Commit 53090cd

Browse files
committed
Reorder docker file for faster builds
1 parent 09728a2 commit 53090cd

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

Dockerfile

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ RUN apt-get update \
3939
RUN mkdir -p /home/tools
4040

4141
WORKDIR /tmp
42-
RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/src/hdf5-1.10.7.tar.bz2 \
42+
RUN wget --progress=bar:force:noscroll https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/src/hdf5-1.10.7.tar.bz2 \
4343
&& tar -xvf hdf5-1.10.7.tar.bz2 \
4444
&& cd hdf5-1.10.7 \
4545
&& CFLAGS="-fPIC" CC=mpicc FC=mpif90 ./configure --enable-parallel --with-zlib --disable-shared --enable-fortran --prefix /home/tools \
4646
&& make -j$(nproc) && make install
4747

48-
RUN wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.4.tar.gz \
48+
RUN wget --progress=bar:force:noscroll ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.4.tar.gz \
4949
&& tar -xvf netcdf-c-4.7.4.tar.gz \
5050
&& cd netcdf-c-4.7.4 \
5151
&& CFLAGS="-fPIC" CC=/home/tools/bin/h5pcc ./configure --enable-shared=no --prefix=/home/tools --disable-dap \
@@ -60,27 +60,20 @@ RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-fr
6060
&& cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib \
6161
&& cp metis/include/metis.h /home/tools/include
6262

63-
RUN git clone https://github.com/TUM-I5/ASAGI.git \
64-
&& cd ASAGI \
65-
&& git submodule update --init \
66-
&& mkdir build && cd build \
67-
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \
68-
&& make -j$(nproc) && make install
69-
70-
RUN git clone https://github.com/uphoffc/ImpalaJIT.git \
71-
&& cd ImpalaJIT \
72-
&& mkdir build && cd build \
73-
&& cmake .. && make -j $(nproc) install
74-
7563
RUN wget --progress=bar:force:noscroll https://www.lua.org/ftp/lua-5.3.6.tar.gz \
7664
&& tar -xzvf lua-5.3.6.tar.gz \
7765
&& cd lua-5.3.6 && make linux CC=mpicc && make local \
7866
&& cp -r install/* /home/tools && cd ..
7967

80-
RUN git clone https://github.com/SeisSol/easi \
81-
&& cd easi \
68+
RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \
69+
&& tar -xf eigen-3.4.0.tar.gz \
70+
&& cd eigen-3.4.0 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \
71+
&& make -j$(nproc) install
72+
73+
RUN git clone https://github.com/OSGeo/PROJ.git \
74+
&& cd PROJ && git checkout 4.9.3 \
8275
&& mkdir build && cd build \
83-
&& CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=ON .. \
76+
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \
8477
&& make -j$(nproc) && make install
8578

8679
RUN git clone https://github.com/hfp/libxsmm.git \
@@ -89,16 +82,26 @@ RUN git clone https://github.com/hfp/libxsmm.git \
8982
&& make -j$(nproc) generator \
9083
&& cp bin/libxsmm_gemm_generator /home/tools/bin
9184

92-
RUN git clone https://github.com/OSGeo/PROJ.git \
93-
&& cd PROJ && git checkout 4.9.3 \
85+
### Put all dependencies, which point to a specific version, before this comment
86+
### Put all dependencies, which use the lates version, after this comment to reduce build time
87+
88+
RUN git clone https://github.com/TUM-I5/ASAGI.git \
89+
&& cd ASAGI \
90+
&& git submodule update --init \
9491
&& mkdir build && cd build \
95-
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \
92+
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \
9693
&& make -j$(nproc) && make install
9794

98-
RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \
99-
&& tar -xf eigen-3.4.0.tar.gz \
100-
&& cd eigen-3.4.0 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \
101-
&& make -j$(nproc) install
95+
RUN git clone https://github.com/uphoffc/ImpalaJIT.git \
96+
&& cd ImpalaJIT \
97+
&& mkdir build && cd build \
98+
&& cmake .. && make -j $(nproc) install
99+
100+
RUN git clone https://github.com/SeisSol/easi \
101+
&& cd easi \
102+
&& mkdir build && cd build \
103+
&& CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=ON .. \
104+
&& make -j$(nproc) && make install
102105

103106
RUN git clone https://github.com/SeisSol/SeisSol.git \
104107
&& cd SeisSol \

0 commit comments

Comments
 (0)