JupyterLab¶
Launch JupyterLab from the Open Ondemand dashboard by clicking JupyterLab icon. This opens the app form that will submit a Slurm job to run a classic JupyterLab server with your requested resources.
Getting started¶
JupyterLab runs as a Slurm job on a compute node. Once resources are allocated, Open Ondemand starts a single‑user JupyterLab server for you.
To start your server, fill out the request form and submit. It may take a few minutes to start depending on cluster load. The server runs until you stop it or the time limit is reached.
Note
Closing the browser/tab does not stop the server. It keeps running on the cluster until you stop it or it times out.
Request form fields¶
When launching the Jupyter app, you will need to configure several settings:
- Account:
- If using a UT login, the default Account should be used
uthpc. - If using an ETAIS login, choose the appropriate Account allocation under which you would like to use the resources.
- If using a UT login, the default Account should be used
- Partition:
- This determines which partition on the Rocket cluster your job will run on.
- In most cases, then 'main' partition should be used. More information about partitions.
- CPU cores:
- Select the number of CPU cores needed for your Jupyter instance.
- Libraries may use multiple cores, so consider requesting more if needed.
- Memory (GB):
- Choose the amount of memory required by the Jupyter instance.
- On your very first run, allocate more memory - 12 GB. Otherwise the job may run out of memory. On first startup the image is being built for your user.
- Typically, 4-6 GB is sufficient, but larger datasets may require more.
- python version:
- Select the desired Python version.
- Number of hours:
- Since Jupyter runs within a Slurm job, you must specify a time limit.
- The job does not stop automatically when idle; it only stops when the time limit is reached.
- Jupyter mode:
- Choose between Jupyter Notebook or JupyterLab interface.
- Default selection will be JupyterLab.
- Working directory:
- Specify the working directory for the Jupyter session.
- This is the directory where your notebooks and data files will be located.
-
venv path:
- Specify the absolute path to a virtual environment to run the server under.
- If the path doesn’t exist, Ondemand will create a virtualenv there automatically.
- If it exists, the server uses that environment.
- Leave empty to use the default system Python.
Note
Venv pathfield might break the current Jupyter installation and is going to be removed in the future. If you are encountering issues when starting Jupyter, then clear this field.
After clicking Launch, the job is submitted to the cluster. You will be redirected to a job status screen where the job state is displayed. The Slurm job ID is shown in brackets next to JupyterLab, which may be useful for debugging.
To monitor progress and see session messages:
- Open Ondemand: My Interactive Sessions → click on Session ID for your Jupyter session.
- In the session’s filesystem view, check
output.logfor real-time updates.
Important
When finished, stop your server to free resources for others and avoid unnecessary usage.
Stopping your server¶
- You can end current session from the top right corner of the Jupyter interface (Quit)
or
- Open My Interactive Sessions, find your Jupyter session, and click Delete/Stop.
Usage¶
Default kernel¶
The default Python 3 kernel is available. Exact versions can change as the system is updated.
Installing Python packages¶
Important
Don’t install into the shared system Python. Use the venv path field to create or reuse your own virtual environment under your home or project space.
Managing packages in Jupyter is best done via the use of kernels. Kernels are processes, that run independently and interact with the Jupyter applications and user interfaces. You can think of them as separate execution environments that you can start, stop and manage with the Jupyter interface. The best way to use Jupyter is to create virtual environments and then kernels that reference them.
- Open a terminal either in the cluster or in the launched Jupyter instance. The former needs you to have
condainstalled. This can be achieved withmodule load miniconda3. The Jupyter instance hascondaavailable already. - Create an environment with
conda create -n envname python=3.12.0 conda. It is highly recommended to specify the python version and conda to better isolate the environment from the surrounding infrastructure. - Load the environment with
source activate envnameand install necessary packages to the environment. This can be done later as well when your package needs evolve. - With the environment activated initialize the kernel:
conda install ipykernel # install the ipykernel package to the environment python -m ipykernel install --user --name="envname" --display-name="Name shown in Jupyter" - The kernel is installed to
~/.local/share/jupyter/kernels. It basically consists of akernel.jsonfile that contains the necessary metadata. - Back in Jupyter, use Kernel → Restart to pick up new packages.
- You might need to restart the Jupyter session as well to pick up new kernels
- Uv is a very fast package manager for Python.
- Uv is not available as a module and you need to install it yourself. The official guide can be found on this page
- Create the environment with
uv venv --python 3.11.6 envname. The environment will be created to the current directory you are in unless specified otherwise. - Activate the environment with
source ./envname/bin/activate. Note that you need to know where the environment is located. - Install packages with
uv pip install packagenameas needed, this can be done later as well. - With the environment activated, initialize the kernel:
uv pip install ipykernel python -m ipykernel install --user --name="envname" --display-name="Name shown in Jupyter" - The kernel is installed to
~/.local/share/jupyter/kernels. It basically consists of akernel.jsonfile that contains the necessary metadata. - Back in Jupyter, use Kernel → Restart to pick up new packages.
- You might need to restart the Jupyter session as well to pick up new kernels
- Open a terminal either in Jupyter or directly on the cluster
- Enable
virtualenvwithmodule load py-virtualenv - Create a virtual environment with
virtualenv my-env-name - Activate the environment with
source my-env-name/bin/activate - Install packages as needed with
pip install packagename, this can be done later as well - With the environment activated, initialize the kernel:
pip install ipykernel python -m ipykernel install --user --name="envname" --display-name="Name shown in Jupyter" - The kernel is installed to
~/.local/share/jupyter/kernels. It basically consists of akernel.jsonfile that contains the necessary metadata. - Back in Jupyter, use Kernel → Restart to pick up new packages.
- You might need to restart the Jupyter session as well to pick up new kernels
Using R in Jupyter¶
The Jupyter project has support for a multitude of languages, one of the other popular ones is R. Since R doesn't operate in the virtual environments ecosystem, the kernels will use the packages installed generally under your user. To create a R kernel, the process is as follows:
- Load the required R version with
module load r/4.4.1 - Open the R terminal with
R - Install the kernel package with
install.packages('IRkernel')and load it withlibrary(IRkernel) - Initialize the kernel with
IRkernel::installspec(user=TRUE, name='my-r-kernel-name', displayname='Name shown in UI')
The kernel should be available in Jupyter after these steps. You may need to start a new session for it to appear.
Note
You can manage R packages with Conda environments. To achieve this, create a Conda environment, activate it and run conda install r-base. After that, you can run the same steps to initialize the kernel and only packages installed while that same environment is active will be available.
Debugging¶
If you are having issues starting up your Jupyter instance, check the logs from you rocket user at the path ondemand/data/sys/dashboard/batch_connect/sys/bc_jupyter/output/<session_id>/output.log If there were any issues the error should be shown there.
If the first startup of your Jupyter instance failed, clean up the Jupyter session folder before trying again.
Problems and requests¶
This service is currently in beta and under development. If you notice problems or would like any more extensions or features, then please write to support@hpc.ut.ee .
When contacting support, include:
- The Slurm job ID and the session output (from View Output).
- What you tried and the exact error text/traceback.
FAQ¶
Session stuck on pending without error
Refresh the page. If it persists, stop the session from My Interactive Sessions and start a new one.
Can I install Jupyter extensions?
System-wide extensions are not supported. You may install user-level extensions in your venv, but they’re not guaranteed to work in this environment.
Accidentally closed the browser
The session keeps running until time limit. Log back in to ondemand.hpc.ut.ee and reconnect via My Interactive Sessions.
Server has died
Likely exceeded memory/time limits and Slurm killed it. Check View Output for OOM/time-limit messages and request more resources next time.
Can't access or stop the session from the UI
Use My Interactive Sessions to Stop/Delete. If needed, contact support with your Slurm job ID.
Clicked Launch twice
Avoid repeated clicks. If duplicate jobs start, stop the extras from My Interactive Sessions.
Additional information¶
- Jupyter Project
- JupyterLab docs
- Jupyter Notebook docs
- Tutorials and demos: https://jupyter.org/try