Software
Software Stacks¶
Currently 4 special Jupyter software stacks are available via Lmod:
jupyter/minimal
Minimal installation of JupyterLabjupyter/base
Basic installation of JupyterLab.jupyter/ai
Preinstalled software packages for machine learning applications. Includes among others TensorFlow, Keras, Torch, Lightning, MXNet, Pandas, Matplotlib, SKLearn.jupyter/extensions
Preinstalled software packages for machine learning applications. Includes among others TensorFlow, Keras, Torch, Lightning, MXNet, Pandas, Matplotlib, SKLearn.
These software stacks can be used both when accessing the cluster via JupyterHub, as well as for conventional access via SSH via module load
.
A continuously updated list with the installed packages can be found on the corresponding subpage of the respective cluster:
Installation of further software¶
The software provided by the Lmod modules jupyter/minimal, jupyter/base and jupyter/ai can be easily supplemented by additional Python packages. There are 2 procedures for this.
- User-Installation (not recommended)
pip install --user <packageName>
The additional packages are installed under$HOME/.local/lib/python3.9/site-packages/
which is part ofPYTHONPATH
. - Virtual environments (recommended) The user can create and use virtual environments (cf. Virtual environments). Packages provided by the jupyter Lmod modules remain visible and usable.
Virtual environments¶
Python virtual environments allow to use different versions of a package and to keep your local site-packages (accessible under PYTHONPATH
) free from conflicts.
Creation of virtual environment¶
$ virtualenv -p python <myEnv>
$ source <myEnv>/bin/activate
$ pip install <packageName>
$ deactivate
The additional packages are installed under <myEnv>/lib/python3.9/site-packages/
.
Usage of virtual environment¶
In order to use the virtual environment, it has to be activated via source <myEnv>/bin/activate
. PYTHONPATH
is set accordingly. Deactivation of the venv is done via deactivate
.
Usage of virtual environment in JupyterLab¶
To be able to use the virtual environments within JupyterLab, a corresponding kernel has to be installed:
$ source <myEnv>/bin/activate
$ python -m ipykernel install \
--user \
--name myEnv \
--display-name "Python (myEnv)"
After installing the kernel (and possibly refreshing the browser window), a button named "myEnv" is available in JupyterLab. The kernel can also be selected from the drop-down menu.
R language¶
In order to use R language in JupyterLab, the Lmod module math/R
has to be loaded (blue button in JupyterLab or module add math/R
in terminal) and a corresponding kernel has to be installed.
$ R
install.packages('IRkernel')
IRkernel::installspec()
After installing the kernel , a button named "R" is available in JupyterLab. The kernel can also be selected from the drop-down menu.
Attention
Don't forget to load the math/R
module (blue button) before using the kernel.
Julia language¶
In order to use Julia language in JupyterLab, the Lmod module devel/julia/1.10.2
has to be loaded (blue button in JupyterLab or module devel/julia/1.10.2
in terminal) and a corresponding kernel has to be installed.
$ julia
]
add IJulia
After installing the kernel , a button named "Julia 1.10.2" is available in JupyterLab. The kernel can also be selected from the drop-down menu.
Attention
Don't forget to load the devel/julia/1.10.2
module (blue button) before using the kernel.