Skip to content

Customizing JupyterHub

Bruno P. Kinoshita edited this page Jul 12, 2020 · 5 revisions

NB: This is a draft. Its contents will be moved to cylc-doc or to another repository.

Customizing JupyterHub is a common task, with recurrent threads in the JupyterHub gitter channel, and in their Discourse list. Unfortunately, for some customizations, users may have to edit JupyterHub source code.

The main reference for customizing JupyterHub is its documentation page, in special the part about working with templates.

Logo

The c.JupyterHub.logo_file configuration key in jupyterhub_config.py customizes the logo. Allowing users to use their own project logo.

c.JupyterHub.logo_file = '../cylc.png'

Spawn form

JupyterHub provides a form that can be used to override the configured spawner settings.

Example of use cases:

  • The network ports available are limited due to firewall; so instead of using random ports, the spawner could allow users to type or choose from a range of ports
  • There are multiple environments such as research, production, tests, and the user can choose which environment to use

JupyterHub has a code example showing how to use this feature.

Display notes to users

To display notes to users, such as security warnings for example, you could either extend a page of JupyterHub template, or just set the JupyterHub.template_vars configuration value.

JupyterHub.template_vars = {'announcement': 'This is PRODUCTION!'}
Clone this wiki locally