Ngshare: A Solution for Using nbgrader with JupyterHub and Kubernetes

Hi, teachers and administrators who use nbgrader:

We’re team KALE, and we want to introduce to you a service we have created that lets you use nbgrader in a JupyterHub cluster.

nbgrader is a tool that facilitates creating and grading assignments in the Jupyter notebook. It allows instructors to easily create notebook-based assignments that include both coding exercises and written free-responses. nbgrader also provides a streamlined interface for quickly grading completed assignments.

nbgrader was known to use an exchange directory to release and collect assignment, submission and feedback files. nbgrader by default does not work when used in combination with JupyterHub and Kubernetes because on a Kubernetes setup users have their own private filesystem.

We have spent a couple of months creating ngshare, a service that handles course management and exchanging assignments between instructor and students without an underlying shared filesystem. It can be installed in Kubernetes easily using a helm chart. Even if you aren’t using a container orchestration platform, you can still install ngshare as a JupyterHub managed service and streamline course creation rather than having to play with filesystem permissions. Installation guides are available on Read the Docs. Any suggestions or feedback would be greatly appreciated.

Please see this video for a brief overview of our work: https://www.youtube.com/watch?v=FdK0AGwxkSw

We have also done some work on porting the nbgrader nbextensions to JupyterLab. More info is available in Github issue #1006 in the nbgrader repo. We are looking for contributors who want to take over our project.

We would like to thank Professor Christopher Nitta and Professor Jason K. Moore from UC Davis for their advice on this project. We would also like to thank the Jupyter community for their help.

Team KALE

4 Likes

Recently Otter-Grader was presented in this forum. Now I wondered: When would you consider ngshare to be the better-suiting solution?

Sorry for the late reply! ngshare is designed to be used alongside nbgrader, so it is more desirable for people already familiar with nbgrader. I only took a quick look at Otter-Grader, and it seems to be pretty different from nbgrader. I think it’s highly dependent on whether the instructor prefers nbgrader or Otter-Grader.

ngshare is designed for when students are using the same JupyterHub as their instructor. If that’s the case, students can fetch assignment files and submit them in one click using the default nbgrader interface. Otter-Grader seems to be dealing with distribution and handin using Gradescope or Canvas instead, although there is an option to have a separate server that does the grading. I think if all students and instructors in your school / organization uses the same Hub, nbgrader + ngshare is a decent choice.

There are other differences between nbgrader and Otter-Grader (such as nbgrader using a GUI (cell toolbar) to create assignments and test cases, while Otter-Grader uses a json file; nbgrader requires the instructor to grade the assignments using their Jupyter notebook server, while Otter-Grader can be setup on a headless server (otter service) that automatically grades and gives feedback, etc), but those aren’t really relevant to ngshare itself. ngshare only deals with assignment distribution and collection for nbgrader. There’s a Github issue about comparing Otter-Grader with nbgrader, and I’m sure people more familiar with both can provide a better breakdown there.

2 Likes

Thank you so much for your valuable input!

1 Like