forked from GridTools/gtbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
76 lines (67 loc) · 2.32 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
ARG BUILD_FROM=ubuntu:19.10
FROM ${BUILD_FROM} as base
LABEL maintainer="Felix Thaler <[email protected]>"
RUN apt-get update -qq && \
apt-get install -qq -y \
build-essential \
wget \
git \
tar \
software-properties-common && \
rm -rf /var/lib/apt/lists/*
ARG CMAKE_VERSION=3.14.5
RUN wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \
tar xzf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \
cp -r cmake-${CMAKE_VERSION}-Linux-x86_64/bin cmake-${CMAKE_VERSION}-Linux-x86_64/share /usr/local/ && \
rm -rf cmake-${CMAKE_VERSION}-Linux-x86_64*
ARG BOOST_VERSION=1.67.0
RUN export BOOST_VERSION_UNERLINE=$(echo ${BOOST_VERSION} | sed 's/\./_/g') && \
wget -q https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNERLINE}.tar.gz && \
tar xzf boost_${BOOST_VERSION_UNERLINE}.tar.gz && \
cp -r boost_${BOOST_VERSION_UNERLINE}/boost /usr/local/include/ && \
rm -rf boost_${BOOST_VERSION_UNERLINE}*
RUN wget -q http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz && \
tar xf mpich-3.1.4.tar.gz && \
cd mpich-3.1.4 && \
./configure --disable-fortran --enable-fast=all,O3 --prefix=/usr/local/ && \
make -j $(nproc) && \
make install && \
ldconfig && \
cd .. && \
rm -rf mpich-3.1.4*
ENV CMAKE_PREFIX_PATH=/usr/local/lib/cmake
RUN git clone -b release_v1.1 https://github.com/GridTools/gridtools.git && \
mkdir -p gridtools/build && \
cd gridtools/build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
.. && \
make -j $(nproc) install && \
cd ../.. && \
rm -rf gridtools
RUN git clone https://github.com/GridTools/GHEX.git && \
mkdir -p GHEX/build && \
cd GHEX/build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
.. && \
make -j $(nproc) install && \
cd ../.. && \
rm -rf GHEX
FROM base
ARG GTBENCH_BACKEND=mc
ARG GTBENCH_RUNTIME=ghex_comm
COPY . /gtbench
RUN cd /gtbench && \
mkdir -p build && \
cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DGTBENCH_BACKEND=${GTBENCH_BACKEND} \
-DGTBENCH_RUNTIME=${GTBENCH_RUNTIME} \
.. && \
make -j $(nproc) && \
cp benchmark convergence_tests /usr/bin/ && \
rm -rf /gtbench/build
CMD ["/usr/bin/convergence_tests"]