Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In addition to the official JupyterHub, it is possible to create specialized hubs to be used for specific courses. If you are an instructor for a course (or courses) and think the course might benefit from its own JupyterHub, you can contact us through NTNU Hjelp or via email at jupyterhub (at) it.ntnu.no.

Please include the following info:

  1. Relevant course code(s)
  2. Approximate number of students
  3. Name and NTNU email address for at least one instructor responsible for the JupyterHub
  4. Is there a need for delivering and grading assignments with nbgrader on the hub? 
  5. Any customisation required? 

Customisation

The hubs can be customised in a few different ways.

All of our hubs are based on the Jupyter official jupyter/datascience-notebook image, with a few additional tweaks. Generally speaking, the image covers many use-cases within basic programming and datascience with the packages and modules it has by default. You can find the full list of the pre-installed packages here. However, many courses require specific packages to be installed. It is possible to install any packages and modules, notebook- and/or jupyterlab extensions that should be ready for the students by default. We can of course Unfortunately this can be only done by the admins, the instructors (and any other users) can only install packages to their own environments. 

The hubs use the Jupyterlab interface by default, but that can be changed to the Notebook interface. That is not a hard limitation however, users can always change between the lab and notebook interfaces just by changing the URL.

It is also possible to increase the available resources each user is allocated. The default configuration, 1 CPU core and 1 GB RAM, is somewhat limited. Depending on the size of the course, the limits may be increased slightly to allow for faster processing and larger datasets. 

Accessing the hub

While the official JupyterHub allows anyone at NTNU to log in, access to the custom hubs is generally limited to students and instructors enrolled to specific courses. Access to the hubs is usually limited to two types of user groups: 

  • The first group is the FS group(s) for the course(s), which means that all students and course staff registered to the course should gain access to the hub automatically. These groups are fully managed by FS, we cannot manually add students to them.
  • The second group is an ad-hoc group that is created while creating the hub. The ad-hoc group can be used to invite additional people to use the hub, who are not affiliated with the course in FS - for example teaching assistants or guest lecturers. The ad-hoc groups are most of the time called "NTNU Jupyterhub {course name}". The course coordinator (or the person contacting us about creating the hub) will receive an email invitation to manage the adhoc group, and after accepting the invitation they will be able to invite additional people to the group as well as grant additional people the ability to invite others. The group can be managed at https://innsyn.feide.no/groups. NOTE: the 'Make Admin' toggle when inviting people to the group only refers to being able to administrate the ad-hoc group (add and remove other users), it does not have any effect on the user's status on the actual JupyterHub.

Admin users and instructors

The course coordinator (or the person contacting us about creating the hub) will receive the admin role on the hub. First and foremost, the admin role allows users to access the admin panel. The panel can be accessed through https://{hubname}.apps.stack.it.ntnu.no/hub/admin or by clicking the 'Admin' link in the hub control panel.

Hub control panel

From the admin panel, admin users are able to access every other users' environments. It is also possible to start and stop every users' environments all at once - please be careful with these controls.

Through the admin panel, admin users can also give and take away the admin role to and from other users.

Admin panel

Admin users can also add users to a special 'instructors' group. The group gives fewer privileges than admin users; members have write access to the 'Shared' folder as well as certain privileges for the nbgrader assignment system (if enabled for the hub). Instructors cannot add new instructors or hub admins.

Adding users to the group can be done by first clicking the 'Manage Groups' link in the admin panel, and then

  1. Click to edit the 'instructors' group
  2. Type an existing username into 'Add by username field'
  3. Click 'Add user'
  4. Click 'Apply'

Sharing notebooks and other files with students

'Shared' folder

The shared folder can be used as a simple way for sharing files from the course staff to students on the hub. The folder is a simple directory of which contents every user on the hub can see and read from, but only admin users and members of the instructor group can write to. 

nbgitpuller 

The Jupyter extension nbgitpuller can be used create a link that will automatically clone a git repository onto a user's environment, given that your notebooks and files you want to share are stored in a publicly accessible git repository. It is incredibly simple to use, no git experience required; the user only needs to click the link, and nbgitpuller will transfer the files from the git repository to the user. nbgitpuller is automatically installed on each hub. 

Website for generating nbgitpuller links: https://nbgitpuller.readthedocs.io/en/latest/link.html

Assignments on JupyterHub

NBGRADER DOCUMENTATION COMING SOON

https://nbgrader.readthedocs.io/en/stable/