generated from 2i2c-org/hub-user-image-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
38 lines (31 loc) · 1.28 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
FROM quay.io/jupyter/scipy-notebook:2023-12-08
USER root
# Install desktop packages
# Also installs 'zip' needed by jupyter-tree-download
RUN apt-get update -qq --yes > /dev/null && \
apt-get install --yes -qq \
zip \
dbus-x11 \
firefox \
xfce4 \
xfce4-panel \
xfce4-terminal \
xfce4-session \
xfce4-settings \
xorg \
xubuntu-icon-theme \
openjdk-8-jre \
libreoffice > /dev/null
USER ${NB_USER}
COPY environment.yml /tmp/
RUN mamba env update -p ${CONDA_DIR} -f /tmp/environment.yml && mamba clean -afy
# For https://2i2c.freshdesk.com/a/tickets/187
# If we don't set `NLTK_DATA`, the data gets downloaded onto $HOME, which
# isn't available when the image is loaded onto JupyterHub.
# So we download alongside our packages.
# Note that textblob.download_corpora just calls nltk to download corpora
ENV NLTK_DATA ${CONDA_DIR}/nltk_data
RUN mkdir -p ${NLTK_DATA} && python -m textblob.download_corpora
RUN jupyter nbclassic-extension install --sys-prefix --py jupyter_nbextensions_configurator --overwrite && \
jupyter nbclassic-extension enable --sys-prefix --py jupyter_nbextensions_configurator && \
jupyter nbclassic-serverextension enable --sys-prefix --py jupyter_nbextensions_configurator