-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
91 lines (77 loc) · 2.02 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
FROM debian:12
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
RUN apt-get update \
&& apt-get -y -qq --no-install-recommends install \
cmake \
curl \
binutils-dev \
make \
automake \
autotools-dev \
autoconf \
libtool \
zlib1g \
zlib1g-dev \
libmpich-dev \
libatomic1 \
libfabric-dev \
libxml2-dev \
python3 \
python3-pip \
python3-venv \
gfortran \
gcc \
g++ \
git \
graphviz \
libgtest-dev \
clang-15 \
libomp-15-dev \
libdw-dev \
libdwarf-dev \
clang-format-15 \
llvm-15 \
lldb-15 \
ninja-build \
vim \
openssh-client \
gdb \
wget \
googletest \
&& apt-get -yq clean \
&& rm --recursive --force /var/lib/apt/lists/*
RUN ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck
RUN ln -s /usr/bin/clang-15 /usr/bin/clang
RUN ln -s /usr/bin/clang++-15 /usr/bin/clang++
RUN ln -s /usr/bin/clang-format-15 /usr/bin/clang-format
COPY requirements.txt .
# Install Python dependencies and ensure to activate virtualenv (by setting PATH variable)
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip3 install --no-input --no-cache-dir --disable-pip-version-check -r /requirements.txt
ENV MPICH_CC=clang
ENV MPICH_CXX=clang++
ENV OMPI_CC=clang
ENV OMPI_CXX=clang++
ENV CC=mpicc
ENV CXX=mpicxx
# Run as non-privileged user
RUN useradd -ms /bin/bash user
WORKDIR /home/user
USER user
COPY MUST-v1.9-omp-checks.tar.gz .
# Install MUST
RUN mkdir -p ~/must && cd ~/must
RUN tar xf MUST-v1.9-omp-checks.tar.gz
RUN cd MUST-v1.9-omp-checks && \
mkdir BUILD-mpich && cd BUILD-mpich && \
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BACKWARD=ON -DENABLE_FORTRAN=OFF -DENABLE_TYPEART=OFF \
-DCMAKE_INSTALL_PREFIX=~/must \
-DENABLE_TESTS=ON && \
make -j$(nproc) install
# Copy test cases in container
COPY --chown=user:user tests /home/user/tests
RUN chmod +x /home/user/tests/run_tests.sh
ENV PATH="/home/user/must/bin:$PATH"