However, it’s not immediately clear how to send that as a config option through z2jh helm config.yaml file. Is there a suggested manner in which to do this?
@mahendrapaipuri it looks as though it’s now being run as it’s own command rather than being passed through to jupyter-server. I’m getting the following error on the pod post-spawn:
[FATAL tini (7)] exec --ContentsManager.hide_globs='["__pycache__", "*.pyc", "*.pyo", ".DS_Store", "*.so", "*.dylib", "*~", "lost+found",]' failed: No such file or directory
Should I instead be adding a first element in that array such that it’s c.singleuser.cmd = ['jupyter-singleuser', '--ContentsManager.hideglobs=<opt>'] ?
I realized the actual command is jupyterhub-singleuser (sorry I’d missed the “hub” part of that in my last comment)
I’ve added cmd: ["jupyterhub-singleuser", "--ContentsManager.hide_globs='[\"__pycache__\", \"*.pyc\", \"*.pyo\", \".DS_Store\", \"*.so\", \"*.dylib\", \"*~\", \"lost+found\",]'"] to the singleuser attribute in the helm chart and the servers are spawning nicely now. However, despite this I am still seeing the lost+found directory appearing in my jupyterlab instances. Any thoughts on what I’m doing wrong?
As it is a list of strings, maybe something strange happening during escaping? I guess jupyter_server is attempting to read it as a string and not list of string and so ignoring it? If you enable debug logging and check single user pod logs, you ll see if the config parameter is being taken into account or not.
A better solution would be to add a config file to one of the config paths of jupyter.
Thank you as always @mahendrapaipuri - while it’s admittedly frustrating this cmd approach doesn’t work (based on the logs the escaping appears to be received just fine), I do seem to recall reading somewhere that jupyterhub-singleuser does not actually process cmd line args as part of some design decision.
So this alternative approach is not only helpful in working around that, but provides me more customizability than just this one param too. Moreover, I’m already pulling a custom image for singleuser instances, so copying a file to take care of this is time consuming, but will work for me.
For anyone coming across this in the future, I am taking the following approach:
ssh into a running singleuser jupyterlab server
run jupyter server --generate-config to generate a config file with defaults and comments
customize the config file using
putting into /home/jovyan/.jupyter/jupyter_server_config.py on my custom Docker image
building and deploying that image
Given the amount of time step 5 typically takes, I’m hopeful this works
No, it does. We just it in our production JupyterHub. I guess the argument is being passed as string and not list and so it is getting ignored (price of not having type safety)
You should be able to use singleUserFiles to inject this config file at runtime without having to build custom image.
Unfortunately, it appears this config param is being ignored. Despite following the process I outlined above, I’m still seeing my “lost+found” dir in jupyterlab.
I think the new docker I created has not been pulled by the spawner and it’s still using the previous manifestation, despite pullPolicy: Always and tag: latest – either of which should force an update, but neither of which seem to work for me (and apparently many others who’ve posted about this).