connec2jupyterhub

Jupyterhub is a multi-user server to serve Jupyter Notebooks to a large number of users. It is integrated with Mistral's batch scheduling system to allocate computing resources and launch Jupyter Notebooks directly on the HPC system. It therefore also supports the execution of parallel computation.

  • Once there we have two Spawner options to start a session within Levante: preset and advanced.
  • If we choose the preset the info that we will fill is the following one:
    • job profile: 5 GB Interactive 12hr (e.g.)
    • account: bm1159
    • Reservation: empty
    • Quality of Service (QoS): empty

The preset spawner loads the classical notebook mode. To switch it to the jupyterlab mode we simply need to go the URL and add /lab before /tree:

classical notebook: https://jupyterhub.dkrz.de/user/k204229/preset/tree/home/dkrz/k204229?
jupyterlab:         https://jupyterhub.dkrz.de/user/k204229/preset/lab/tree/home/dkrz/k204229?



  • The advanced session is especially for advanced users with a certain knowledge of Mistral and Slurm configuration (thorough info about all the advanced options can be found here). Among many other options it offers us the possibility to choose between Jupyter notebook, Jupyterlab and Terminal session. The essential parameters that we will need to fill up to open a session with similar characteristics as the preset but using Jupyerlab are the following ones:
    • account: bmx825
    • partition: Miklip
    • reservation: ClimXtreme (NOTE: only at the day of the workshop, 2021.04.15, otherwise None)
    • time: 12.00
    • memory: 5120 MB
    • Quality of Service (QoS): empty
    • user interface: JupyterLab


Once the session is open, we can navigate through our folder structure via web or also via virtual terminal. It allows us to choose among multiple python preset kernels, one R kernel and one Julia kernel as well, but we also have the choice to load our own environment. Naturally we can open and run our jupyter notebook files here.

We can use Jupyterhub as a simple text editor as well, but we could also connect some local IDE (e.g. VS Code) remotely with some kernel in DKRZ.

There are a few points you should be aware of when working with Jupyter Notebooks on the jupyterhub server:

  1. Sessions are persistent. If you close the browser tab without stopping the server before, you can revisit the jupyterhub site and carry on working.

  2. Closing browser’s tab or log-in out will not stop your session, your session will continue consuming resources (see next point).

  3. It is preferable to close the session when you finish. This depends on how you started the session (preset, advanced):

    • JupyterLab: File → Hub Control Panel → (preset/advanced) and then stop.

    • classical Jupyter: Control Panel → (preset/advanced) and then stop

  • connec2jupyterhub.txt
  • Last modified: 2023/09/28 14:06
  • by etorma