Passing configuration to

I’m using nb_conda_kernels in my baremetal JupyterHub environment and it’s all good. Now I want to add some configuration to that package and, according to its official documentation, this can be done by changing the file:

To set it in jupyter config file, edit the jupyter configuration file (py or json) located in your jupyter --config-dir

  • for - add a line “c.CondaKernelSpecManager.env_filter = ‘regex’”

The actual configuration I want to apply is c.CondaKernelSpecManager.name_format = "{language} [{environment}]. I added this line to my but it didn’t work. Is there a way to pass configuration lines that were originally aimed to be in the in JupyterHub?

I think you’ll have to put the configuration in a file that JupyterLab/notebook can find, e.g. in your user’s home directory. JupyterHub only handles authentication and starting/stopping your singleuser server.

1 Like

I’ve found the official docs on this:

Jupyter and IPython support “system-wide” locations for configuration, which is the logical place to put global configuration that you want to affect all users. It’s generally more efficient to configure user environments “system-wide”, and it’s a good idea to avoid creating files in users’ home directories.

The typical locations for these config files are:

  • system-wide in /etc/{jupyter|ipython}
  • env-wide (environment wide) in {sys.prefix}/etc/{jupyter|ipython} .

Putting my into /etc/jupyter did the trick.