Closed hpc-cofc closed 4 years ago
It is either a client-side browser / javascript issue or a server side configuration issue.
To rule out client-side, can you look in your browser's console and see if there are error messages? If there are error messages, provide these messages and your browser version.
To rule out server side, in the address bar:
/lab
by /lmod/list
-> this should display a web page with a JSON aray of the modules currently loaded (equivalent of module list
)/lab
by /lmod/avail
-> this should display a web page with a JSON array of the modules available (equivalent of module av
).If one or both rest API endpoints do not return values, the jupyter-lmod extension is misconfigured.
Thanks for the quick reply. You may have helped me figure out the problem. It looks like the Lmod modules were not showing up for the local spawner, but they do show up when I use the SLURM spawner. My SLURM spawner batch script explicitly activates Lmod while the local spawner doesn't.
jupyterhub.config
c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner'
c.SlurmSpawner.batch_script = '''#!/bin/bash
#SBATCH -p {partition}
#SBATCH --time={runtime}
#SBATCH --nodes=1
#SBATCH --ntasks-per-node={nprocs}
#SBATCH --mem={memory}
#SBATCH --job-name=Jupyter
#SBATCH --output=/home/{username}/jupyterhub-spawner.%j.log
#SBATCH --export=ALL
#SBATCH --workdir=/home/{username}/jupyter
#SBATCH {options}
export MODULEPATH=/XYZ/modulefiles
source /XYZ/lmod/7.8.1/init/bash
module load autotools prun/1.2 gnu8/8.3.0 openmpi3/3.1.3 ohpc use.own
...
module load anaconda/3/2020.02
source activate jupyter-hub
{cmd}
'''
c.ProfilesSpawner.profiles = [
( 'Local ', 'local', 'jupyterhub.spawner.LocalProcessSpawner', {'ip':'0.0.0.0'} ),
( 'Debug- 8 cores + 32GB RAM for 2hrs', 'debug-8-2', 'batchspawner.SlurmSpawner', dict( req_partition='debugq', req_nprocs='8', req_memory='32GB', req_runtime='2:00:00'))
...
]
I may just need to find a way to activate Lmod for the local spawner.
/lab
with /lmod/[list/avail]
does show the list of loaded and available modules.Thanks for your help.
Glad I could help!
I'm encountering a similar issue with no modules being picked up in jupyterlab servers launched locally. Was there a specific solution to activate Lmod for the local spawner?
For future reference, this needed LMOD_CMD and MODULEPATH to be defined explicitly using c.Spawner.environment
in jupyterhub_config.py. (Essentially, this boiled down to the lmod setup not being sourced in the jupyterhub systemd script in a typical setup.)
I installed the jupyter-lmod extension as described in the README file and I can see the Lmod icon in my JupyterLab interface, but it doesn't show any modules.
LMOD version=7.8.1 JupyterLab version=2.1.1
What would I have to do for the Jupyter-Lmod extension to find and show my LMOD modules?
Thanks.