-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
73 lines (56 loc) · 1.68 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM jupyter/minimal-notebook:lab-3.6.1 as base
USER root
#
# Additional packages
#
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
# Stuff for pip install
build-essential \
python3-dev \
libffi-dev \
# Common useful utilities
git \
nano-tiny \
tzdata \
unzip \
vim-tiny \
curl \
dnsutils \
jq \
moreutils \
# git-over-ssh
openssh-client \
rsync && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# JupyterLab extensions
#
# Notebook dependencies
# (Includes Notebook server extension dependencies)
#
COPY scripts/requirements.txt /tmp/notebook-requirements.txt
RUN python3 -m pip install --no-cache -r /tmp/notebook-requirements.txt
RUN rm -f /tmp/notebook-requirements.txt
#
# Enable server extensions
#
RUN python3 -m bash_kernel.install
FROM base as release
COPY scripts/chi-requirements.txt /tmp/chi-requirements.txt
ARG openstack_release=xena
RUN python3 -m pip install --no-cache -r /tmp/chi-requirements.txt
RUN rm -f /tmp/chi-requirements.txt
# FIXME(jason): this should not be necessary, it should automatically be enabled on install.
RUN jupyter serverextension enable jupyterlab_chameleon
#
# Notebook start hooks
#
COPY scripts/start-notebook.d/* /usr/local/bin/start-notebook.d/
COPY scripts/before-notebook.d/* /usr/local/bin/before-notebook.d/
# Everything in serverroot gets copied to the user's working directory on start
RUN mkdir -p /etc/jupyter/serverroot
COPY scripts/serverroot/* /etc/jupyter/serverroot/
COPY scripts/bashrc.d /etc/jupyter/bashrc.d
FROM release as dev
# Copy this script to run after all other set up runs.
COPY scripts/start-notebook-dev.sh /usr/local/bin/before-notebook.d/999_start_dev.sh