-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (47 loc) · 1.67 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
ARG BASE_CONTAINER=jupyter/scipy-notebook
FROM $BASE_CONTAINER
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
RUN apt-get update --yes && \
apt-get install --yes \
libgirepository1.0-dev \
libcairo2-dev && \
# python3-dev \
# gir1.2-secret-1 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
USER ${NB_UID}
ENV PATH /opt/conda/envs/env/bin:$PATH
ENV INSTALL_CONDA_PACKAGES plotly \
pandas-profiling
# Install kqlmagic and related packages
ENV INSTALL_PIP_PACKAGES jupyterlab-git \
kqlmagic \
pyvis \
setuptools_git \
pandas-bokeh \
datetime \
pycairo \
PyGObject
# Install conda and pip packages
RUN conda install --quiet --yes ${INSTALL_CONDA_PACKAGES} && \
pip install --upgrade --quiet ${INSTALL_PIP_PACKAGES} && \
conda clean --all -f -q -y && \
pip cache purge && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
RUN jupyter labextension install @jupyterlab/git --no-build && \
jupyter labextension enable git && \
jupyter lab build --dev-build=False
# Import matplotlib the first time to build the font cache.
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
fix-permissions /home/$NB_USER
# The first time you 'import plotly' on a new system, it has to build the
# font cache. This takes a while and also causes spurious warnings, so
# we can just do that during the build process and the user never has to
# see it.
RUN /opt/conda/bin/python -c 'import plotly'
USER ${NB_UID}
WORKDIR "${HOME}"