Skip to content
Snippets Groups Projects
Verified Commit 4a332cc1 authored by Simon Schwitanski's avatar Simon Schwitanski :slight_smile:
Browse files

Run checks as non-privileged user

parent f6d43f3b
No related branches found
No related tags found
No related merge requests found
Pipeline #376065 failed
......@@ -95,18 +95,24 @@ FROM base-${MPI_FLAVOR} AS final
ARG MUST_VERSION=1.9.2
# Build and install MUST
RUN mkdir -p /opt/must/
WORKDIR /build
RUN wget https://hpc.rwth-aachen.de/must/files/MUST-v${MUST_VERSION}.tar.gz && \
tar -xf MUST-v${MUST_VERSION}.tar.gz && cd MUST-v${MUST_VERSION} && \
mkdir build && \
cd build && \
tar -xf MUST-v${MUST_VERSION}.tar.gz && mkdir -p MUST-v${MUST_VERSION}/build
RUN cd MUST-v${MUST_VERSION}/build && \
CC=clang CXX=clang++ MPICH_CC=clang MPICH_CXX=clang++ OMPI_CC=clang OMPI_CXX=clang \
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/must -DUSE_BACKWARD=ON -DENABLE_TESTS=ON -DENABLE_FORTRAN=ON -DLLVM_FILECHECK_PATH=$(which FileCheck) -DCMAKE_BUILD_TYPE=Release && \
make install -j8 install-prebuilds && \
make check-basic -j8 && \
rm /MUST-v${MUST_VERSION}.tar.gz && \
rm -r -f /MUST-v${MUST_VERSION}
make install -j8 install-prebuilds
# Run as non-privileged user
# Run checks as non-privileged user (required for OpenMPI)
RUN useradd -ms /bin/bash user
RUN chown -R user /build
USER user
RUN cd MUST-v${MUST_VERSION}/build && \
make check-minimal -j8
RUN rm -r /build
# Run container as non-privileged user
WORKDIR /home/user
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment