问题
I leverage Docker containers to launch JupyterLabs and would like the ability to apply user settings directly at launch, instead of configuring user settings through the "Advanced Settings Editor" GUI at every container launch.
In reviewing the following pull request, it does seem that this functionality should exist: https://github.com/jupyterlab/jupyterlab/pull/2585
I have not found anything referencing this capability in the JupyterLab documentation, so any leads would be greatly appreciated!
回答1:
Running jupyter-lab --generate-config
should generate a config file in /home/<USER>/.jupyter/jupyter_notebook_config.py
回答2:
I couldn't find any documentations, however in your folder ~/.jupyter/lab/user-settings/@jupyterlab
if you create a custom notebook configuration (for instance), you will have a file created in notebook-extension/tracker.jupyterlab-settings
.
You can copy the folder(s) you want to use for each of your container in this location, then when you start a jupyter lab, you should see the custom configuration(s) loaded correctly.
回答3:
Settings for extensions are documented here:
https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#settings
In short, you can supply and overrides.json
in <sys-prefix>/share/jupyter/lab/settings
where <sys-prefix>
can be found by running jupyter lab path
.
The example from the docs shows an overrides.json
like this:
{
"@jupyterlab/apputils-extension:themes": {
"theme": "JupyterLab Dark"
}
}
来源:https://stackoverflow.com/questions/48950670/jupyterlab-user-settings-file