-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
49 lines (44 loc) · 1.79 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
ARG BUILD_FROM=ubuntu:20.04
FROM ${BUILD_FROM} as base
LABEL maintainer="Felix Thaler <[email protected]>"
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
build-essential \
file \
git \
libmpich-dev \
tar \
software-properties-common \
wget \
libnuma-dev && \
rm -rf /var/lib/apt/lists/*
ARG CMAKE_VERSION=3.28.3
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.73.0
RUN export BOOST_VERSION_UNDERLINE=$(echo ${BOOST_VERSION} | sed 's/\./_/g') && \
wget -q https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERLINE}.tar.gz && \
tar xzf boost_${BOOST_VERSION_UNDERLINE}.tar.gz && \
cp -r boost_${BOOST_VERSION_UNDERLINE}/boost /usr/local/include/ && \
rm -rf boost_${BOOST_VERSION_UNDERLINE}*
FROM base
ARG GTBENCH_BACKEND=cpu_ifirst
ARG GTBENCH_RUNTIME=ghex_comm
ARG GTBENCH_PYTHON_BINDINGS=OFF
COPY . /gtbench
RUN cd /gtbench && \
mkdir -p build && \
cd build && \
if [ -d /opt/rocm ]; then export ROCM_PATH=/opt/rocm; export PATH=${ROCM_PATH}/bin:${PATH}; export CXX=${ROCM_PATH}/bin/hipcc; fi && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DGTBENCH_BACKEND=${GTBENCH_BACKEND} \
-DGTBENCH_RUNTIME=${GTBENCH_RUNTIME} \
-DGTBENCH_PYTHON_BINDINGS=${GTBENCH_PYTHON_BINDINGS} \
.. && \
make -j $(nproc) install && \
rm -rf /gtbench/build
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH}
CMD ["convergence_tests"]