Skip to content

Commit

Permalink
Dockerfile: Add a user for OpenMPI (#257)
Browse files Browse the repository at this point in the history
OpenMPI does not like to be run as root.
  • Loading branch information
sjackman authored Oct 5, 2018
1 parent a4079c5 commit 116d2e3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
FROM ubuntu:latest
FROM ubuntu:18.04
MAINTAINER Shaun Jackman <sjackman@gmail.com>

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bsdmainutils libgomp1 make openmpi-bin ssh
bsdmainutils libgomp1 make openmpi-bin ssh sudo \
&& useradd -m -s /bin/bash abyss \
&& echo 'abyss ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
ADD . /tmp/abyss
RUN apt-get install -y --no-install-recommends \
automake g++ libboost-dev libopenmpi-dev libsparsehash-dev \
&& cd /tmp/abyss \
&& ./autogen.sh \
&& mkdir build && cd build \
&& ../configure --with-mpi=/usr/lib/openmpi \
&& ../configure --with-mpi=/usr/lib/x86_64-linux-gnu/openmpi \
&& make install-strip \
&& rm -rf /tmp/abyss \
&& apt-get autoremove -y binutils \
automake g++ libboost-dev libopenmpi-dev libsparsehash-dev
ENV SHELL=/bin/bash
USER abyss
WORKDIR /home/abyss
ENV SHELL=/bin/bash USER=abyss
ENTRYPOINT ["abyss-pe"]
CMD ["help"]

0 comments on commit 116d2e3

Please sign in to comment.