Jupyter Hub

On currently one of the compute servers (dellsrv01), we have activated a Jupyter Hub service, which allows you to run you Python, Julia, R or Matlab notebooks on this compute server.

Please direct your browser to

and log in with your standard username and password:

login

Afterwards you can choose the kernel to use for the notebook. Please note that for Julia, R and Matlab you have to make some modifications yourself as described below.

kernel

The current state of the notebook is kept active even when ending the browser session. However, any unsaved changes will get lost when the server reboots or the Jupyter service is restarted. Therefore,

Always save your notebooks!

Adding Kernels

All the following commands have to be performed in a terminal window logged in to dellsrv01!

After installing a new kernel, you should log out from the Jupyter service and log in again to make the changes active.

Julia

You have to install the IJulia package. First load the Julia module to enable the latest version of Julia and start Julia:

module load julia
julia

Afterwards install the IJulia package:

using Pkg
Pkg.add("IJulia")

Macaulay2

Run

python3 -m m2_kernel.install

Matlab

This requires building the corresponding Matlab module:

module load matlab/2022b
cd /opt/local/matlab/R2022b/extern/engines/python
python3 setup.py build -b $HOME/workspace
mkdir -p $HOME/.local/lib/python3.9/site-packages/
mv $HOME/workspace/lib/matlab $HOME/.local/lib/python3.9/site-packages/
python3 -m matlab_kernel install --prefix=$HOME/.local
rm -rf $HOME/workspace

Here, Matlab version 2021a is used. If you prefer a different version, please change the above lines accordingly.

R

In this case, you need to install the kernel setup manually. First create the corresponding directory:

mkdir -p $HOME/.local/share/jupyter/kernels/R

Then, edit the file $HOME/.local/share/jupyter/kernels/R/kernel.json and insert the following content:

{
  "argv": ["/usr/bin/R", "--quiet", "-e", "IRkernel::main()", "--args", "{connection_file}"],
  "display_name":"R",
  "language":"R"
}