Jupyter

Foldspace provides access to Jupyter, using the Jupyter Lab interface.

Example of Foldspace Jupyter interface

Start the tool

You can access it via:

  • the --tool jupyter-latest option on Leonardo and Pitagora:

foldspace --user <your username> --cluster <cluster name> --tool jupyter-latest [any slurm directive you like]
  • the --tool jupyter-iac option on Galileo100:

foldspace --user <your username> --cluster g100 --tool jupyter-iac [any slurm directive you like]

After the command is executed, a Slurm job is submitted and Jupyter starts on the allocated node. Foldspace will then display a URL to be opened in your browser.

Here it follows some examples of the possible combinations you might want to use:

  • Start Jupyter on the Leonardo serial partition (default), with a single task (default) for up to 30 minutes (default):

    foldspace --user <your username> --cluster leonardo --tool jupyter-latest
    
  • Start Jupyter on the Leonardo Booster partition using 8 tasks and a single GPU for up to 120 minutes:

    foldspace --user <your username> --cluster leonardo --tool jupyter-latest --partition boost_usr_prod --ntasks 8 --gres gpu:1 --time 02:00:00
    
  • Start Jupyter on the Galileo100 prod partition using a full node in exclusive mode for up to 4 hours:

    foldspace --user <your username> --cluster g100 --tool jupyter-iac --partition g100_usr_prod --exclusive --ntasks 32 --time 04:00:00
    

Note

The jupyter-latest tool undergoes rolling updates approximately every 45-60 days. These updates apply to all bundled software, including Python environments, CUDA versions, and the Jupyter release; consequently, please ensure your code remains compatible with the latest versions of the core software. A jupyter-stable tool will be released in the future to make backward compatibility easier to mantain.

Warning

The Jupyter tool, provided by Foldspace, runs in a container. Consequently, some Linux system paths may differ from those encountered via SSH or through non-containerized tools such as Code Server. While this is generally transparent during standard operations, issues may arise when linking dependencies for code compiled outside the container. If your pre-compiled code fails to run within Jupyter, we recommend recompiling it directly from the Jupyter terminal, building a separate installation to be used in Jupyter. Please note that on Pitagora containers are not allowed on the serial partition, thus Pitagora users may want to always specify the --partition option.

Default environments

The following content is provided by default in the Jupyter tools (click to expand):

jupyter-latest (Leonardo, Pitagora)
CUDA version

The jupyter-latest environment is currently based on CUDA 13.3.

Python environments

Several Python environments are provided by default. Clicking the tabs below will display the packages from the requirements file used to build them. Please note that additional packages will be present in each environment due to dependencies; you can obtain the full list by running %pip list in a Jupyter notebook (after selecting the corresponding kernel in the top-right menu). You can also create your own environments, as described in the section User custom Python environments.

numpy

scipy

pandas

matplotlib

openpyxl

black

boto3

certifi

click

cloudpickle

cryptography

dask

distributed

fastapi

fastparquet

fsspec

h5py

hydra-core

jax

joblib

jsonlines

lightgbm

matplotlib

mlflow

msgpack

notebook

numpy

omegaconf

orjson

packaging

pandas

pathlib

plotly

prometheus_client

psutil

pyarrow

py-cpuinfo

pydantic

pytest

python-dotenv

pytorch-lightning

pyyaml

ray

requests

rich

ruff

s3fs

scikit-learn

scipy

seaborn

smart-open

tensorboard

threadpoolctl

torch

torchaudio

torchmetrics

torchvision

tqdm

typer

urllib3

uvicorn

wandb

xgboost

accelerate

black

boto3

certifi

chromadb

click

cloudpickle

cryptography

dask

datasets

deepspeed

diffusers

distributed

evaluate

fairscale

faiss-cpu

fastapi

fastparquet

fsspec

h5py

huggingface_hub

hydra-core

jax

joblib

jsonlines

langchain

langchain-community

lightgbm

llama-index

matplotlib

mlflow

msgpack

notebook

numpy

omegaconf

openai

orjson

packaging

pandas

pathlib

peft

plotly

prometheus_client

psutil

py-cpuinfo

pyarrow

pydantic

pytest

python-dotenv

pytorch-lightning

pyyaml

ray

requests

rich

ruff

s3fs

safetensors

scikit-learn

scipy

seaborn

sentence-transformers

smart-open

tensorboard

threadpoolctl

tiktoken

tokenizers

torch

torchaudio

torchmetrics

torchvision

tqdm

transformers

trl

typer

urllib3

uvicorn

wandb

xgboost

In addition the following package is installed from https://download.pytorch.org/whl/cu130:

xformers

albumentations

black

boto3

cartopy

certifi

click

cloudpickle

cryptography

dask

distributed

fastapi

fastparquet

fsspec

geopandas

h5py

hydra-core

imageio

jax

joblib

jsonlines

lightgbm

matplotlib

mlflow

msgpack

notebook

numpy

omegaconf

opencv-python

orjson

packaging

pandas

pathlib

pillow

plotly

prometheus_client

psutil

py-cpuinfo

pyarrow

pydantic

pytest

python-dotenv

pytorch-lightning

pyyaml

ray

requests

rich

ruff

s3fs

scikit-image

scikit-learn

scipy

seaborn

smart-open

tensorboard

threadpoolctl

tifffile

timm

torch

torchaudio

torchmetrics

torchvision

tqdm

typer

ultralytics

urllib3

uvicorn

wandb

xarray

xgboost

zarr

From https://pypi.nvidia.com:

cudf-cu13

dask-cudf-cu13

cuml-cu13

cugraph-cu13

nx-cugraph-cu13

cucim-cu13

pylibraft-cu13

raft-dask

cuvs-cu13

nvforest-cu13

nx-cugraph-cu13

jupyter-iac (Galileo100)
CUDA version

The jupyter-iac environment is based on CUDA 11.8.

Python environments

Several Python environments are provided by default. Clicking the tabs below will display the packages from the requirements file used to build them. Please note that additional packages will be present in each environment due to dependencies; you can obtain the full list by running %pip list in a Jupyter notebook (after selecting the corresponding kernel in the top-right menu). You can also create your own environments, as described in the section User custom Python environments.

numpy

scipy

pandas

matplotlib

openpyxl

black

boto3

certifi

click

cloudpickle

cryptography

dask

distributed

fastapi

fastparquet

fsspec

h5py

hydra-core

jax

joblib

jsonlines

lightgbm

matplotlib

mlflow

msgpack

notebook

numpy

omegaconf

orjson

packaging

pandas

pathlib

plotly

prometheus_client

psutil

pyarrow

py-cpuinfo

pydantic

pytest

python-dotenv

pytorch-lightning

pyyaml

ray

requests

rich

ruff

s3fs

scikit-learn

scipy

seaborn

smart-open

tensorboard

threadpoolctl

torch==2.7.1+cu118

torchaudio==2.7.1+cu118

torchmetrics

torchvision==2.7.1+cu118

tqdm

typer

urllib3

uvicorn

wandb

xgboost

accelerate

black

boto3

certifi

chromadb

click

cloudpickle

cryptography

dask

datasets

deepspeed

diffusers

distributed

evaluate

fairscale

faiss-cpu

fastapi

fastparquet

fsspec

h5py

huggingface_hub

hydra-core

jax

joblib

jsonlines

langchain

langchain-community

lightgbm

llama-index

matplotlib

mlflow

msgpack

notebook

numpy

omegaconf

openai

orjson

packaging

pandas

pathlib

peft

plotly

prometheus_client

psutil

py-cpuinfo

pyarrow

pydantic

pytest

python-dotenv

pytorch-lightning

pyyaml

ray

requests

rich

ruff

s3fs

safetensors

scikit-learn

scipy

seaborn

sentence-transformers

smart-open

tensorboard

threadpoolctl

tiktoken

tokenizers

torch==2.7.1+cu118

torchaudio==2.7.1+cu118

torchmetrics

torchvision==2.7.1+cu118

tqdm

transformers

trl

typer

urllib3

uvicorn

wandb

xgboost

In addition the following package is installed from https://download.pytorch.org/whl/cu130:

xformers

albumentations

black

boto3

cartopy

certifi

click

cloudpickle

cryptography

dask

distributed

fastapi

fastparquet

fsspec

geopandas

h5py

hydra-core

imageio

jax

joblib

jsonlines

lightgbm

matplotlib

mlflow

msgpack

notebook

numpy

omegaconf

opencv-python

orjson

packaging

pandas

pathlib

pillow

plotly

prometheus_client

psutil

py-cpuinfo

pyarrow

pydantic

pytest

python-dotenv

pytorch-lightning

pyyaml

ray

requests

rich

ruff

s3fs

scikit-image

scikit-learn

scipy

seaborn

smart-open

tensorboard

threadpoolctl

tifffile

timm

torch==2.7.1+cu118

torchaudio==2.7.1+cu118

torchmetrics

torchvision==2.7.1+cu118

tqdm

typer

ultralytics

urllib3

uvicorn

wandb

xarray

xgboost

zarr

esmvaltool

intake-esgf

User custom Python environments

You can create your own customized Python environment and display them in the Jupyter launcher. In the Jupyter container some scripts are provided to build your own environments, either via Python environments or via Conda (relying on Miniforge).

Tip

Nodes in the serial partition have external internet access, enabling you to create custom environments using pip or conda. You won’t be able to use pip install or conda install using a different value in the --partition option. The serial partition is always the default, thus you can simply omit the --partition option when you need to deploy a new custom environment in your Jupyter interface. Once you have created your environments from the serial partition, you can use them from any other partition as well.

Note

On Pitagora, containers are not allowed on the serial partition, thus this section does not apply for Pitagora users.

You can proceed as follows:

  • open a terminal from your launcher and move in a path where you want to build your environment (a build subdirectory will be created in it)

    Warning

    Be careful to run the following commands from the terminal in the launcher, i.e. clicking on Terminal in the Jupyter web interface) and not via ssh, where they would fail.

  • copy the following directory in your current path; you can rename it as you wish (myenv in the following example):

    cp -r /opt/venvs/template ./myenv
    

    Tip

    In the same /opt/venvs directory you can also find the building directories of the default environments, in case you want to replicate them with your own customizations.

  • move inside the directory:

    cd ./myenv
    

    You will find a config file: edit it with your favourite text editor, replacing its values with your own:

    env_name

    the name of the virtual environment to be created (single word)

    display_name

    the name of the kernel displayed in the Jupyter interface ( can contain whitespaces)

    logo_svg

    an svg file for the logo (can be left to the default “python.svg”)

    requirements_file_list

    a list of txt requirements file containing the list of packages to be installed (check the Pip documentation for details)

    module_list

    an (optional) list of modules to be loaded from the cluster module environment, both when using the Jupyter kernel and during the installation

  • edit the content of requirements.txt (or add in the myenv directory any requirements file you listed in the requirements_file_list parameter inside config), to select the Python packages you want to install via pip

  • run the following command:

    ./env.sh install
    

    This will create a build subdirectory inside myenv, with the virtual environment related to your configuration

    • refresh the browser page, to show your custom environment in your Jupyter Launcher and in your kernels list;

      Jupyter launcher with custom Python virtual environment

    Note

    In case you will need to change the content of the environment in the future, you can change the configuration files mentioned above in myenv and then run:

    ./env.sh reinstall
    

    In case you will need to delete the environment and the related kernel from the Jupyter interface you can run the following:

    ./env.sh remove
    
  • open a terminal from your launcher and move in a path where you want to build your environment (a build subdirectory will be created in it)

    Warning

    Be careful to run the following commands from the terminal in the launcher, i.e. clicking on Terminal in the Jupyter web interface) and not via ssh, where they would fail.

  • copy the following directory in your current path; you can rename it as you wish (myenv in the following example):

    cp -r /opt/conda_envs/template ./myenv
    
  • move inside the directory:

    cd ./myenv
    

    You will find a config file: edit it with your favourite text editor, replacing its values with your own:

    env_name

    the name of the virtual environment to be created (single word)

    display_name

    the name of the kernel displayed in the Jupyter interface ( can contain whitespaces)

    logo_svg

    an svg file for the logo (can be left to the default “forge.svg”)

    environment_file

    a yaml file containing the list of packages to be installed (check the Anaconda documentation for details)

    module_list

    an (optional) list of modules to be loaded from the cluster module environment, both when using the Jupyter kernel and during the installation

  • edit the content of environment,yml (or any other yaml file you specified in the environment_file parameter above)

  • run the following command:

    ./env.sh install
    

    This will create a build subdirectory inside myenv, with the virtual environment related to your configuration

    • refresh the browser page, to show your custom environment in your Jupyter Launcher and in your kernels list;

      Jupyter launcher with custom Python virtual environment

    Note

    In case you will need to change the content of the environment in the future, you can change the configuration files mentioned above in myenv and then run:

    ./env.sh reinstall
    

    In case you will need to delete the environment and the related kernel from the Jupyter interface you can run the following:

    ./env.sh remove
    

Monitoring tools

On the (very) left side of your dashboard there is a vertical menu, which allows the user to access some additional functions. From GPU Dashboards you can monitor the resources usage of your job in real-time, either running on GPUs or only on CPUs. In particular:

  • in the “Machine Resources” section, you can monitor CPUs and memory utilization, and network and I/O bandwidth;

  • if you requested GPUs in the initial job submission, you would see several additional menu to monitor, for example, GPUs utilization, memory bandwidth and occupation, PCIe and NVLink throughput.

Access to WORK and SCRATCH areas

In the left column of the principal page, you can see the content of your $HOME area on the cluster.

Your $WORK and $SCRATCH areas are not visible from your default Jupyter interface. To make them visible and reachable, you need to create a symbolic link in your $HOME directory pointing those areas. In the following example, you create a link to the $SCRATCH area and a link to the $WORK area inside your $HOME directory by launching the following commands in a terminal on the cluster:

ln -s $SCRATCH $HOME/scratch
ln -s $WORK $HOME/work

Thus now you can see a work and a scratch icons in the file manager on the left side of our interface, and you can access them.

Note

It is strongly suggested to create such links to make all the storage available to the Jupyter sessions (and not just the $HOME storage). Please remember that the $WORK variable refers to the work area of your current default account, so you may want to create different links for different accounts and keep them updated over time.

Tip

You can pin scratch and work (or any other path) on top of your Jupyter file browser on the left, by right-clicking them and then choosing “Add Favorite”.