question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unclarity on directory structure / configuration

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
murhum1commented, 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!

0reactions
rkdarstcommented, Aug 5, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Considerations for creating the file and directory structure - IBM
When creating a new package unit, if the project uses a hierarchical directory structure, both a file and a directory are created in...
Read more >
1 Overview of Configuration Files and Directories
This chapter includes the following topics: Configuration Files. Directory Structure. Dynamic Reconfiguration. 1.1 Configuration Files. Each server instance has ...
Read more >
How to set up your GitOps directory structure
This command loads in all the configurations and deploys the cluster-specific configurations onto the Kubernetes cluster.
Read more >
Directory Structure — Security Onion 2.3 documentation
Applications read their configuration from /opt/so/conf/ . However, please keep in mind that most config files are managed with Salt, so if you...
Read more >
Configuring Project Structure | PyCharm Documentation
Configuring Project Structure . Last modified: 19 December 2022. In PyCharm, content is a collection of files with which you are currently working, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found