jupyter_nbextensions_configurator
jupyter_nbextensions_configurator copied to clipboard
Kubernetes JupyterHub Enabling Not Working
I have looked through old issues, but cannot find the solution to my problem. I have set up a Jupyter Notebook docker image that successfully installs nbextensions and the nbextensions configurator (https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator). I am using this docker image to create singleuser pods in Kubernetes JupyterHub (jupyterhub/k8s-hub:0.9.0-beta.2.000.bed779e), but when users start their pods, neither one is enabled (nbextensions are not available and neither is the tab at the top).
If users manually install/enable and restart their pod they both work fine. Additionally, if I build a docker image off the Jupyter Notebook image alone, nbextensions is enabled as intended.
My singleuser dockerfile:
FROM jupyter/datascience-notebook:2343e33dec46
COPY requirements.txt requirements.txt
## install python libraries
RUN pip install --upgrade pip && \
pip install --upgrade -r requirements.txt && \
sleep 60 && \
jupyter contrib nbextension install --user && \
jupyter nbextensions_configurator enable --user && \
jupyter nbextension enable hinterland/hinterland && \
jupyter nbextension enable rubberband/main && \
jupyter nbextension enable codefolding/main
requirements.txt includes
jupyter_contrib_nbextensions
jupyter_nbextensions_configurator
My .yml file for Kubernetes JupyterHub contains the following for singleuser pod:
singleuser:
storage:
capacity: 1Gi
extraVolumes:
- name: 'nfs-volume-{username}'
nfs:
server: ...
path: '/'
extraVolumeMounts:
- name: '...-{username}'
mountPath: /home/jovyan/shared
nodeSelector:
cloud.google.com/gke-nodepool: jhub-pool
extraEnv:
GRANT_SUDO: "yes"
uid: 0
cmd: null
cpu:
limit: 4
guarantee: 0.05
memory:
limit: 4G
guarantee: 512M
image:
name: gcr.io/.../singleuser-image
tag: ...
Any ideas about how to automatically have nbextensions available to my JupyterHub users would be greatly appreciated!!!