nebari icon indicating copy to clipboard operation
nebari copied to clipboard

[ENH] - Store user Jupyter settings on NFS

Open kcpevey opened this issue 3 years ago • 5 comments

Feature description

Would it be possible to store the user's jupyter settings on NFS rather than the JHub server?

Value and/or benefit

Whenever an upgrade (and maybe a redeploy?) happens, I lose my jupyter settings. Its not a huge deal, just frustrating when my keybindings suddenly go missing and I have to set them up again.

I'm guessing this is happening because the user settings are currently kept on the JHub server which is destroyed. If they were kept on NFS, we could have persistent settings... right??

Anything else?

No response

kcpevey avatar Oct 12 '22 13:10 kcpevey

@kcpevey where does normally the jupyter settings are stored?

viniciusdc avatar Oct 12 '22 14:10 viniciusdc

where does normally the jupyter settings are stored?

I admittedly don't know. I'm just an end user with a vision, opening this up for discussion 😉

kcpevey avatar Oct 12 '22 19:10 kcpevey

Is there a jlab setting to allow setting the path for config files

dcmcand avatar Feb 08 '24 17:02 dcmcand

Is there a jlab setting to allow setting the path for config files

Yes, using the JUPYTERLAB_SETTINGS_DIR and JUPYTERLAB_WORKSPACES_DIR env variables. Ref: https://jupyterlab.readthedocs.io/en/stable/user/directories.html#jupyterlab-user-settings-directory

pavithraes avatar Feb 08 '24 17:02 pavithraes

More broadly one can set JUPYTERLAB_DIR or LabApp.app_dir to change the JupyterLab application directory in general (these may require copying some static assets over from the default one), see jupyter lab dir for the default.

JUPYTERLAB_SETTINGS_DIR and JUPYTERLAB_WORKSPACES_DIR

Since most nebari settings are set in jupyter-config file it might be beneficial to use c.LabApp.user_settings_dir and c.LabApp.workspaces_dir traits over environment variables.

krassowski avatar Mar 06 '24 19:03 krassowski

I've confirmed my user settings are being stored in my personal space at $HOME/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings and they persist when my user server is shutdown and restarted.

At this point, I think the only way for this to get lost is if the whole system is rebuilt and files are lost. I'm going to close this since my original issue is resolved. If we see this happen after a redeploy, then we can revisit, but my inclination is that it won't be an issue during redeploy.

kcpevey avatar Jul 22 '24 18:07 kcpevey