-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 857 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 857 Bytes
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
FROM python:3.7
MAINTAINER Ashwin Vishnu Mohanan <avmo@kth.se>
RUN apt-get update
RUN apt-get install -y --no-install-recommends git
RUN apt-get install -y --no-install-recommends gfortran
RUN apt-get install -y --no-install-recommends libopenmpi-dev
RUN rm -rf /var/lib/apt/lists/*
RUN groupadd -g 999 appuser && useradd -m -r -u 999 -g appuser -s /bin/bash appuser -s /bin/bash
USER appuser
ARG HOME=/home/appuser
RUN mkdir -p $HOME/opt
WORKDIR $HOME/opt
RUN echo $USER $HOME $PWD && whoami
RUN mkdir -p $HOME/.local/include $HOME/.local/lib
COPY requirements.txt $PWD
RUN pip3 install --no-cache-dir --user -U -r requirements.txt
RUN mkdir -p $HOME/.config/matplotlib
RUN echo 'backend : agg' > $HOME/.config/matplotlib/matplotlibrc
ENV LD_LIBRARY_PATH=$HOME/.local/lib
ENV PATH=$PATH:$HOME/.local/bin
ENV CPATH=$CPATH:$HOME/.local/include