Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclarity on directory structure / configuration #980

Closed
murhum1 opened this issue Jun 19, 2018 · 5 comments
Closed

Unclarity on directory structure / configuration #980

murhum1 opened this issue Jun 19, 2018 · 5 comments
Labels
Milestone

Comments

@murhum1
Copy link

murhum1 commented Jun 19, 2018

I'm currently trying to set up a jupyter notebook environment for a course of >600 students using kubernetes + jupyterhub + nbgrader. Everything jupyterhub-related seems to be working fine so far, but I'm having issues understanding the nbgrader configuration regarding courses and assignments.

My environment currently consists of 3 kubernetes nodes: one for kubernetes related administrative things, one for the jupyterhub container, and one for notebook servers. I'm using kube-spawner to spawn the notebook server containers.

Inside the container, I have 3 directories: /course, /user, and /exchange, all of which are empty to begin with. My nbgrader_config.py is as follows:

c = get_config()

c.Exchange.course_id = "example_course"
c.Exchange.root = "/exchange"

c.CourseDirectory.root = "/course"

And in jupyterhub_config.py I've defined c.KubeSpawner.singleuser_working_dir = '/user'.

Now I've no idea how I'd actually start creating a course. I've tried running nbgrader quickstart my_course in all of the 3 directories, but in all cases, in the jupyterhub "Assignments" tab it says "No courses available", and when I try to create an assignment in the "Formgrader" tab, I get an sql error unable to open database file. And in the UI I can't see the quickstart-created course anywhere, nor any assignments.

All in all I'm just really confused about how the configuration works, and the documentation is just a mess regarding this. Any ideas / pointers on what I should try?

For what it's worth,

Operating system

Ubuntu 16.04

nbgrader --version

0.5.4

jupyterhub --version (if used with JupyterHub)

0.9.0

jupyter notebook --version

5.4.1

@consideRatio
Copy link
Contributor

consideRatio commented Jun 19, 2018

I made a mindmap trying to figure out the details, I hope it is of use to you. In the mindmap you might be able to see the exchange folders as well as the nbgrader actions students and instructors can do, and what kinds of file system permissions for various folders that are required for the actions.

I never made my jupyterhub (deployed using https://z2jh.jupyter.org) support nbgrader since it required me to setup a shared filesystem (like NFS, NFS-ganesha, Rook) for the exchange directories, something I could not find time to do. I lack knowledge to help you setup that, but I know it to be quite tricky =/

@murhum1
Copy link
Author

murhum1 commented Jun 20, 2018

Thanks. I do have an nfs server (or a dummy server at the moment) setup so that's not an issue. At the moment I think the issue is that the nbgrader config file isn't being read at all - as per http://nbgrader.readthedocs.io/en/stable/user_guide/philosophy.html#example, I have an nbgrader_config.py in the root of my course directory, and I tried setting c.NbGrader.logfile = /var/log/nbgrader.log in the config file, but the config file is still being created in the course directory. Do you have any idea where the config file should be in?

EDIT: I managed to possibly solve the issue - In my singleuser notebook server container, I now have a jupyter_notebook_config.py file in /home/jovyan/.jupyter/ (the container user's home dir's jupyter config dir), containing the line c.NbGrader.logfile = "/var/log/grader.log" which seems to be executed before loading any extensions, and the log file gets put in the correct place now. I haven't tried the other options yet, but I believe those should work now, too. Hoping for the best here to be able to continue!

@murhum1 murhum1 closed this as completed Jun 26, 2018
@jhamrick jhamrick added this to the No action milestone Jul 7, 2018
@jhamrick
Copy link
Member

jhamrick commented Jul 7, 2018

Glad you were able to figure this out! I'll note that you should be able to create nbgrader_config.py file in /home/jovyan/.jupyter rather than jupyter_notebook_config.py, but if this works then that's great. See also the note about the config file at the bottom of: https://nbgrader.readthedocs.io/en/stable/configuration/jupyterhub_config.html

@vishwesh5
Copy link

Hi @murhum1 I am also trying to use Zero to Jupyterhub installation (jupyterhub+kubernetes). So far what I have figured out is that I need to have a NFS installed. Let's say I manage to do that somehow, how can I use nbgrader along with it? Can you please give a few pointers regarding how you were able to have that up and running?
Thanks in advance

@rkdarst
Copy link
Contributor

rkdarst commented Aug 5, 2018

@vishwesh5, you can check out this comment to see our current state of things. I hope to make better documentation soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants