forked from gammapy/gammapy-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (32 loc) · 963 Bytes
/
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
# This is the Dockerfile to run Gammapy on Binder
#
FROM continuumio/miniconda3
MAINTAINER Gammapy developers <[email protected]>
# compilers
RUN apt-get update && apt-get install -y build-essential
# install good version of notebook for Binder
RUN pip install --no-cache-dir notebook==5.*
# install dependencies - including the dev version of Gammapy
COPY environment.yml binder.py tmp/
WORKDIR tmp/
RUN conda update conda
RUN conda install -q -y pyyaml
RUN python binder.py
# add gammapy user running the jupyter notebook process
ENV NB_USER gammapy
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
# copy repo in /home/gammapy
COPY . ${HOME}
# setting ownerships
USER root
RUN chown -R ${NB_UID} ${HOME}
# start Jupyter server in notebooks dir
USER ${NB_USER}
WORKDIR ${HOME}/notebooks
# env vars used in notebooks
ENV GAMMAPY_EXTRA /home/${NB_USER}