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.
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.
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.
Is it possible to use ngshare with only docker? Can I just use it as a managed-service and does ngshare also have to be on the single-user containers(DockerSpawner?
Greetings:
I am setting up Z2JH (on azure) and want to leverage ngshare. I have patched my notebooks as recommended here.
The notebooks work pretty well but the ngshare service fails with the message:
503 : Service Unavailable
Your server appears to be down. Try restarting it from the hub
When I take a look at the pods, the ngshare pod is pending for ever!
NAME READY STATUS RESTART AGE
continuous-image-puller-6krb8 1/1 Running 0 3h54m
continuous-image-puller-g9bhb 1/1 Running 0 3h54m
continuous-image-puller-xgnj8 1/1 Running 0 3h54m
hub-c57bb7c84-tvdzh 1/1 Running 0 3h54m ngshare-665755fdbb-75pn4 0/1 Pending 0 3h20m
proxy-5cb4994b6b-8pgmt 1/1 Running 0 3h54m
user-scheduler-76b99ff776-d4g72 1/1 Running 0 3h54m
user-scheduler-76b99ff776-xzzt5 1/1 Running 0 3h54m
Running describe on the pod return the event below:
Events:
Type Reason Age From Message
I already posted this request for help in the corresponding github repo, but as I really need this, I am publishing this also here in the hope someone could help.
I gently request some help to make possible this ngshare service work with jupyterhub >= 2.0. It has been working fine while I used jupyterhub 1.3, but after upgrading jupyterhub to 2.x I get this error:
/authorizations/cookie endpoint is deprecated in JupyterHub 2.0. Use /api/user with OAuth tokens
Hello,
I just added 'admin': True
to
c.JupyterHub.services.append({
‘name’: ‘ngshare’,
‘admin’: True,
‘url’: ‘http://ngshare.labs.svc.cluster.local:8080’,
‘api_token’: ‘xxxxxxxxx’})
And now I can access to the service html page from the menu services > ngshare in jupyterhub home page.
Is there any explanation to how with this option (admin: True) is working now and it was not needed in jupyterhub 1.3? Does it has any security implications?
I still need to try if ngshare works from students side.
I was able to run it correctly on the local machine, but when trying to host it on bare metal microk8s z2jh, I am facing the same issue. Did you have any progress on this?