Skip to content

Instantly share code, notes, and snippets.

@mgnisia
Created January 6, 2020 12:38
Show Gist options
  • Save mgnisia/e45bde1ee1adc440b20ef3b1f689cce1 to your computer and use it in GitHub Desktop.
Save mgnisia/e45bde1ee1adc440b20ef3b1f689cce1 to your computer and use it in GitHub Desktop.
MPI Dockerfile, used for running Gitlab CI
FROM gcc
# Install MPI
ENV MPI_VERSION 3.3.1
RUN wget http://www.mpich.org/static/downloads/${MPI_VERSION}/mpich-${MPI_VERSION}.tar.gz &&\
tar xfz mpich-${MPI_VERSION}.tar.gz &&\
cd mpich-${MPI_VERSION} &&\
./configure &&\
make -j 4 &&\
make -j 4 install
# Add user to prevent root executing the mpi processes
RUN useradd -mrs /bin/bash mpi -p mpi
USER mpi
WORKDIR /home/mpi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment