Skip to content

Software

Software Stacks

Currently 3 special Jupyter software stacks are available via Lmod:

  • jupyter/minimal
    Minimal installation of JupyterLab
  • jupyter/base
    Basic installation of JupyterLab.
  • jupyter/tensorflow
    Preinstalled software packages for machine learning applications. Includes among others TensorFlow, Keras, Torch, 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/tensorflow 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.6/site-packages/ which is part of PYTHONPATH.
  • 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

python -m venv <myEnv>
source <myEnv>/bin/activate
pip install <packageName>
deactivate
The additional packages are installed under <myEnv>/lib/python3.6/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.

Attention

The (Lmod) base module you used in the Creation of virtual environment step must be loaded to use the venv. However, to be on the safe side, you can also use the system Python (/usr/bin/python3.8) at creation time, which is available even without any jupyter/{base,tensorflow} module loaded.

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.6.2 has to be loaded (blue button in JupyterLab or module devel/julia/1.6.2 in terminal) and a corresponding kernel has to be installed.

julia
]
add IJulia 
After installing the kernel , a button named "Julia 1.6.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.6.2 module (blue button) before using the kernel.


Last update: January 25, 2022