Jupyter Notebooks for OpenShift

Based on this article, a custom Jupyter stack specification used to deploy on OpenShift (using S2I).

Installation

  1. Create Image Stream
  1. Create Build
  1. Start the build, either:
  • oc set env bc/spathe-notebook-build JUPYTER_ENABLE_LAB=true
  • oc set env bc/spathe-notebook-build JUPYTER_NOTEBOOK_PASSWORD=spathe
  • oc start-build bc/spathe-notebook-build
  1. Create app
  • oc new-app spathe-notebook-build --name spathe-notebook-app
  1. Expose
  • oc expose svc/spathe-notebook-app
  1. Set Environment Variables
  • oc set env dc/spathe-notebook-app JUPYTER_NOTEBOOK_PASSWORD=spathe
  • oc set env dc/spathe-notebook-app JUPYTER_NOTEBOOK_INTERFACE=lab
  1. Enable Jupyter extensions in the s2i assemble script:
  • jupyter labextension install @jupyter-widgets/jupyterlab-manager@^1.0.1 --no-build
  • jupyter labextension install jupyterlab-dash@0.1.0-alpha.3 --no-build
  • jupyter labextension install jupyterlab_bokeh@1.0.0 --no-build
  • jupyter labextension install @lckr/jupyterlab_variableinspector --no-build
  • jupyter lab build