-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (57 loc) · 1.89 KB
/
Dockerfile
File metadata and controls
65 lines (57 loc) · 1.89 KB
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
ARG BASE_CONTAINER=jupyter/datascience-notebook
FROM $BASE_CONTAINER
USER root
# Install pre-requisites, for example:
# - Geckodriver for altair saver using selenium and firefox webdriver
RUN apt-get update && \
apt-get install -y --no-install-recommends \
firefox-geckodriver \
swig && \
rm -rf /var/lib/apt/lists/*
USER $NB_UID
# Install some conda packages
RUN conda install --quiet --yes \
'altair=4' \
'altair_saver' \
'contextily' \
'dash' \
'descartes' \
'fuzzywuzzy' \
'geopandas' \
# 'jupyterlab-dash=0.1.0a3' \
'jupytext' \
'nbgrader' \
'nbresuse' \
'openpyxl' \
'osmnx' \
'rise' \
'pandas-profiling' \
'vega_datasets' \
'xgboost' \
&& \
conda clean --all -f -y && \
pip install --quiet --no-cache-dir \
'auto-sklearn' \
'jupyterlab_templates' && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
# Install jupyter lab extensions
RUN jupyter labextension install @aquirdturtle/collapsible_headings --no-build && \
# jupyter labextension install jupyterlab-dash@0.1.0-alpha.3 --no-build && \
jupyter labextension install jupyterlab-drawio --no-build && \
jupyter labextension install jupyterlab-topbar-extension --no-build && \
jupyter labextension install jupyterlab-system-monitor --no-build && \
jupyter labextension install @jupyterlab/shortcutui --no-build && \
jupyter labextension install @jupyterlab/toc --no-build && \
jupyter labextension install @telamonian/theme-darcula --no-build && \
jupyter lab build && \
jupyter lab clean
# Add custom user settings from .jupyter folder
USER root
ENV NB_UID=$NB_UID \
NB_GID=$NB_GID
ADD ./.jupyter /home/$NB_USER/.jupyter
RUN chown -R $NB_UID:$NB_GID /home/$NB_USER/.jupyter
RUN fix-permissions /home/$NB_USER/.jupyter
# Switch back to jovyan to avoid accidental container runs as root
USER $NB_UID