Closed ktaletsk closed 9 months ago
Thanks for the suggestion!
Lmod documentation recommends running module --initial_load --no_redirect restore
after setting LMOD_SYSTEM_DEFAULT_MODULES.
https://lmod.readthedocs.io/en/latest/070_standard_modules.html
The module restore tries to restore the user’s default collection. If that doesn’t exist, it then uses contents of the variable LMOD_SYSTEM_DEFAULT_MODULES to find a colon separated list of Modules to load.
Is it possible in your environment to first run module restore
before launching the jupyter-single-server? Is it the case already?
You mentionned that lmod CLI respects that choice, is the CLI access with Jupyter terminal?
@ktaletsk: can you also tell me which spawner you are using?
Reporting back after more than a year (😱) delay!
module --initial_load --no_redirect restore
worked perfectly in the latest version, no code modifications needed. I just added it to start-singleuser.sh
script right before loading JupyterLab. I tested in Dockerspawner.
In our project using jupyter-lmod is combined with a system where users can select the environment modules they want prior to the launch of the server in JupyterHub. The user choices is then translated to environment variable
LMOD_SYSTEM_DEFAULT_MODULES
in the user server. However, we noticed that even though lmod CLI would respect that choice, the jupyter-lmod would not.We found that resetting the extension backend by calling
_lmod.reset()
resolved our issue. Therefore, we offer to add this change in the upstream