Loading Modules into the Kernel (Notebook) environment¶
Check what modules are currently loaded in this Notebook session¶
In [1]:
Copied!
!module list --no-pager
!module list --no-pager
Currently Loaded Modulefiles: 1) micromamba/2.2.0
Put this file load_modules_into_jupyter.conf
into your Home directory and your Notebook environment will have these modules loaded.
It is not possible to load these modules via magic (python magic ;).
It needs the empty line at the end...
In [2]:
Copied!
%%writefile ~/load_modules_into_jupyter.conf
eccodes/2.25.0-gcc-12.2.0-y2gnn47
%%writefile ~/load_modules_into_jupyter.conf
eccodes/2.25.0-gcc-12.2.0-y2gnn47
Overwriting /jetfs/home/yourusername/load_modules_into_jupyter.conf
In [3]:
Copied!
!cat ~/load_modules_into_jupyter.conf
!cat ~/load_modules_into_jupyter.conf
eccodes/2.25.0-gcc-12.2.0-y2gnn47
Restart the kernel and you should see that the module is loaded¶
In [1]:
Copied!
!module list --no-pager
!module list --no-pager
Currently Loaded Modulefiles: 1) micromamba/2.2.0 4) netcdf-c/4.9.2-gcc-12.2.0-wicjkfm 2) mpich/4.1.2-gcc-12.2.0-mzdfzqb 5) eccodes/2.25.0-gcc-12.2.0-y2gnn47 3) hdf5/1.10.10-gcc-12.2.0-cnot2wb