UW-IT JupyterHub for Teaching Quickstart & Tutorial


On This Page

Who this guide is for

This guide is intended for people who would like to use Jupyter Notebooks as a managed service to support teaching and learning at the University of Washington, but are unfamiliar with the technology. Watch a short video showing Jupyter Notebooks in action. An overview of this service and link to the course Hub request form can be found on the service overview page. We also have a some best practices that are worth reviewing before using the service.

Introduction & key concepts

The UW JupyterHub for Teaching service provides UW hosted computational environments that require only a web browser to access. These environments are made available for UW courses by request and at no cost, and allow faculty and students enrolled in the course to access a Jupyter Notebook environment of their own. Each user environment in a given hub starts up from an identical immutable image, which supports reproducibility as well as makes troubleshooting easier.

Upon request, a JupyterHub for the entire course is created, which allows users to log in with their UW NetID and provides shared tools and management capabilities for instructors. When requesting a Hub for their course(s), instructors can choose from one of several preconfigured Notebook types or create one of their own and use that instead (we refer to these as Notebook images). The different Notebook images provide for different suites of installed software and Python packages using Pip or Conda, based on the teaching requirements. When a user logs into their Notebook using the JupyterLab, Classic Jupyter Notebook, or RStudio web interface, they will have access to interactive notebooks and scripts, the pre-installed software and tools, a Linux filesystem and terminal, and custom components that are provided by the Notebook image that was selected. Instructors can also specify a Git repository be synced with each student’s environment in order to distribute course materials automatically.

UW JupyterHub architectural diagram The diagram above illustrates a typical course configuration.

Course design fundamentals

Determine software and libraries

Once you've decided to use Jupyter Notebooks in your course, the next step is to determine what software and packages you would like your students to use and review the standard base images to determine which will be suitable, or if a custom image is needed. Learn more about UW supported images. Note that it is possible to have students install additional dependencies themselves during a session, but the installed software does not persist on their Jupyter Notebook server due to the immutability of the Notebook servers. This is generally a benefit as it helps with reproducibility of work in student notebooks, as well as ensuring that students can always return their environment to a known working state by restarting their session. For packages installed with pip, students can use the following syntax to install packages into their home directory and avoid the need to reinstall each time a session starts: pip install --user <some_package> (or, in a notebook code cell: !pip install --user <some_package>).

Set up the Notebooks

At this point, you will also begin to create the notebook(s) with the lesson materials and interactive elements for your students. If you are starting from scratch, you may want to review some examples of existing notebooks to get an idea of what is possible:

Prototype and test

Depending on how complex your notebook is, you can either prototype and test the course using Jupyter Notebook running on your own computer, or by running one of the supported UW JupyterHub for Teaching Jupyter Notebook images locally using Docker.

Request and manage a Hub

Once you have determined the Jupyter Notebook server requirements based on the Notebook(s) you would like to run in your course, you can submit a request for a course Hub on the IT Connect page. Requests should include:

After your Hub has been provisioned, you will be provided with a link that allows you to log in with your UW NetID. As an admin, you will be able to access your own Jupyter Notebook server, as well as an admin page where you can view and access student Jupyter Notebook servers. You can also designate other users as admins from this view.

JupyterHub Admin view:

 JupyterHub admin view

 

In the hub admin page, clicking Spawn Page next to any user's name will start their Jupyter Notebook server and redirect your browser to the JupyterLab view. If the server you're starting is not your own, there will be an additional authorization prompt. Clicking edit user allows you to grant admin access to that user (Note: do not change a user's name, as it will prevent them from logging in). You can also delete users from this page, however if that user is still in the course roster for the associated course, they would automatically be recreated the next time the course syncs.

 

Edit user view:

 JupyterHub admin - edit user view

Below is the main view for interacting with the Jupyter Notebook server. The interface shown is "JupyterLab," the newer interactive environment which supersedes the original Jupyter Notebooks classic interface. You can find documentation about this interface is available from the built-in help menu item ("Help" > "Jupyter Notebook Reference") as well as on the JupyterLab Interface site.

Sample notebook loaded: 

Jupyter Notebook - sample ipynb view

The notebooks are the main area where users will be spending their time. Jupyter notebooks are documents with the ".ipynb" extension that combine live runnable code with narrative text (Markdown), equations (LaTeX), images, interactive visualizations and other rich output. Detailed documentation as well as discussion of the concept of "literate programming" is available on the official Project Jupyter site.

Some caveats to bear in mind when designing and using notebooks:

Jupyter Notebook - restart kernel dialog

Jupyter Notebook - active tabs and kernels pane

Next steps