Skip to main content

ContainDS Dashboards extension for JupyterHub

Project description

ContainDS Dashboards for JupyterHub

A Dashboard publishing solution for Data Science teams to share results with decision makers.

Run a private on-premise or cloud-based JupyterHub with extensions to instantly publish notebooks as user-friendly interactive dashboards to share with non-technical colleagues.

This open source package allows users to create interactive Jupyter notebooks that can be instantly and reliably published as secure interactive Voila web apps. Any authorised JupyterHub user can view the dashboard.

How it works

  • Data scientist creates a Jupyter Notebook as normal
  • Data scientist creates a new Dashboard to clone their Jupyter server
  • Other logged-in JupyterHub users see the dashboard in their list
  • Click to launch as a server, using OAuth to gain access
  • User sees a safe user-friendly Voila version of the original notebook

All of this works through a new Dashboards menu item added to JupyterHub's header.

Data scientist creates a Jupyter Notebook as normal

Original Jupyter Notebook

Data scientist creates a new Dashboard to clone their Jupyter server

Create New Dashboard

Other logged-in JupyterHub users see the dashboard in their list

Other User sees dashboard

Click to launch as a server

Dashboard Voila built automatically

Uses OAuth to gain access

Other user OAuths

Other user sees a safe user-friendly Voila version of the original notebook

Voila Dashboard

Requirements

Basic requirements:

  • JupyterHub 1.0+
  • DockerSpawner 0.11.0+
  • Python 3.6+

You should be able to use any authenticator for users to login - for example, corporate Google email sign in, or LDAP.

Support for Kubernetes JupyterHub installations running KubeSpawner is in development - please get in touch with your requirements to help move this forward.

Installation

Make sure your JupyterHub is already working, using DockerSpawner to start the single-user servers.

To install the components of the ContainDS Dashboards extension:

pip install cdsdashboards

Generic Changes to jupyterhub_config.py

Ensure you enable named servers, and also check that DockerSpawner has a naming convention compatible with named servers:

c.JupyterHub.allow_named_servers = True

c.DockerSpawner.name_template = "{prefix}-{username}-{servername}"

c.DockerSpawner.image = 'ideonate/jh-voila-oauth-singleuser:scipy-dc9744740e12'

The image used for the single-user servers must have voila and jhsingle-native-proxy installed - see details below, or try the image listed above.

Enabling Dashboards in jupyterhub_config.py

The following options in your config file will install the extension. Please note if you have existing customisations you may need to merge these with your existing settings.

from cdsdashboards.app import CDS_TEMPLATE_PATH, cds_tornado_settings
from cdsdashboards.hubextension import cds_extra_handlers

c.JupyterHub.template_paths = [ CDS_TEMPLATE_PATH ]
c.JupyterHub.tornado_settings = cds_tornado_settings
c.JupyterHub.extra_handlers = cds_extra_handlers

Options

Options to remove 'Named Server' functionality for users on their home page. You can remove the named server section and/or the new bottom section where servers started to act as dashboards are hidden.

c.JupyterHub.template_vars = {
    'cds_hide_user_named_servers': False,
    'cds_hide_user_dashboard_servers': False
    }

Image

The image you use for the single-user server should have voila and jhsingle-native-proxy installed, plus a second 'entrypoint' at /opt/conda/bin/voila-entrypoint.sh to run the Voila server.

Please see docker-singleuser-images for an example, or use the ones created for you already, e.g. jh-voila-oauth-singleuser:scipy-dc9744740e12.

Contact and Support

This software is an alpha version. Please see LICENSE for details.

Please do get in touch if you try out the package, or would like to but need some support. I would be very interested to find out how it can be used, and to work (without charge) to help you get it running. The project needs feedback in order to develop further!

Contact support@containds.com with any comments or questions at all. Thank you.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdsdashboards-0.0.7.tar.gz (30.4 kB view hashes)

Uploaded Source

Built Distribution

cdsdashboards-0.0.7-py3-none-any.whl (36.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page