File tree Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 1
1
FROM jupyter/minimal-notebook
2
2
3
- MAINTAINER Austin Rochford <
[email protected] >
4
-
5
- USER root
3
+ ARG SRC_DIR
6
4
7
- # install libav-tools to support matplotlib animations
8
- RUN apt-get update && \
9
- apt-get install -y --no-install-recommends libav-tools && \
10
- apt-get clean && \
11
- rm -rf /var/lib/apt/lists/*
12
-
13
- USER $NB_USER
5
+ MAINTAINER Austin Rochford <
[email protected] >
14
6
15
- COPY scripts/create_testenv.sh /tmp/create_testenv.sh
16
- COPY setup.py $HOME/setup.py
17
- COPY requirements.txt $HOME/requirements.txt
18
- COPY requirements-dev.txt $HOME/requirements-dev.txt
19
- RUN /bin/bash /tmp/create_testenv.sh --global --no-setup
7
+ ADD $SRC_DIR /home/jovyan/
8
+ RUN /bin/bash /home/jovyan/scripts/create_testenv.sh --global --no-setup
20
9
21
10
# matplotlib nonsense
22
11
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
@@ -26,4 +15,4 @@ RUN pip install seaborn
26
15
# Import matplotlib the first time to build the font cache.
27
16
RUN python -c "import matplotlib.pyplot"
28
17
29
- ENV PYTHONPATH $PYTHONPATH:"$HOME" /pymc3
18
+ ENV PYTHONPATH $PYTHONPATH:"$HOME"
Original file line number Diff line number Diff line change @@ -5,10 +5,16 @@ SRC_DIR=${SRC_DIR:-`pwd`}
5
5
NOTEBOOK_DIR=${NOTEBOOK_DIR:- $SRC_DIR / notebooks}
6
6
TOKEN=$( openssl rand -hex 24)
7
7
8
- docker build -t pymc3 -f $SRC_DIR /scripts/Dockerfile $SRC_DIR
8
+ # note that all paths are relative to the build context, so . represents
9
+ # SRC_DIR to Docker
10
+ docker build \
11
+ -t pymc3 \
12
+ -f $SRC_DIR /scripts/Dockerfile \
13
+ --build-arg SRC_DIR=. \
14
+ $SRC_DIR
15
+
9
16
docker run -d \
10
17
-p $PORT :8888 \
11
- -v $SRC_DIR :/home/jovyan/pymc3 \
12
18
-v $NOTEBOOK_DIR :/home/jovyan/work/ \
13
19
--name pymc3 pymc3 \
14
20
start-notebook.sh --NotebookApp.token=${TOKEN}
You can’t perform that action at this time.
0 commit comments