Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Update notebook base image #209

Merged
merged 3 commits into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.tornado_settings = {'headers': {"Content-Security-Policy": "frame-ancestors 'self' *"}}

c.NotebookApp.token = ''
c.NotebookApp.allow_root = True
c.NotebookApp.allow_origin = '*'
Expand Down
18 changes: 10 additions & 8 deletions ansible/roles/workspaces/notebooks/templates/Dockerfile.base.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ RUN python3 -m pip install nbgrader==$NBGRADER_VERSION && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER

# copy global nbgrader config
COPY global_nbgrader_config.py /etc/jupyter/nbgrader_config.py

# support iframes with jupyter notebooks, copy to local config scope to override
# global notebook configs if they are present
COPY jupyter_notebook_config.py /etc/jupyterhub/jupyter_notebook_config.py

# enable classic notebook extensions
# https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html
RUN jupyter contrib nbextension install --sys-prefix && \
Expand All @@ -75,9 +68,18 @@ RUN jupyter contrib nbextension install --sys-prefix && \
# install plotly-orca with npm globally
RUN npm install -g [email protected] orca

# with nbgrader installed, add scripts/configs and update permissions
# copy global nbgrader config
COPY global_nbgrader_config.py /etc/jupyter/nbgrader_config.py

# support iframes with jupyter notebooks, copy to local config scope to override
# global notebook configs if they are present
COPY jupyter_notebook_config.py /etc/jupyter/jupyter_notebook_config.py

# Fix permissions on /etc/jupyter as root
USER root
RUN fix-permissions /etc/jupyter/

# with nbgrader installed, add scripts/configs and update permissions
RUN mkdir -p /srv/nbgrader/exchange \
&& fix-permissions /srv/nbgrader/exchange

Expand Down