Skip to main content

Slurm JupyterLab Extension

A JupyterLab extension that interfaces with the Slurm Workload Manager, providing simple and intuitive controls for viewing and managing jobs on the queue.

Slurm Extension

Prerequisites

  • JupyterLab 4.5.7
  • Slurm

Architecture

This extension consists of two main parts:

  • Backend (Python): A Jupyter Server extension that provides a REST API to interface with Slurm commands (squeue, sbatch, scancel, scontrol, sacct).
    • Handlers are located in jupyterlab_slurm/handlers.py.
    • It uses a base class SlurmCommandHandler to execute shell commands and handle errors.
    • Job details use a specialized JobDetailsHandler that normalizes data from both scontrol and sacct.
  • Frontend (TypeScript/React): A JupyterLab extension that provides the UI.
    • Built with React, MUI (Material UI), and ag-grid-react for high-performance table rendering.
    • Main components: SlurmWidget (top-level), SqueueDataTable (live queue), SlurmJobHistory (completed jobs), and JobDetailsPanel (detailed inspection).
    • State management handles polling, selection snapshots, and navigation between job details.

Installation

This extension includes both a client-side JupyterLab extension and a server-side Jupyter notebook server extension. Install these using the command line with

pip install jupyterlab_slurm

If you are running Notebook 5.2 or earlier, enable the server extension by running

jupyter serverextension enable --py --sys-prefix jupyterlab_slurm

After launching JupyterLab, the extension can be found in the command palette under the name Slurm Dashboard, and is listed under the HPC TOOLS section of the palette and the launcher.

Development install

As described in the JupyterLab documentation for a development install of the labextension you can run the following in this directory:

# install the extension in editable mode
pip install -e .
# point the labextension dev install at the current dir
jupyter labextension develop --overwrite .
# rerun this if there are updates:
jlpm run build

Testing against a local Slurm cluster

For realistic, end-to-end testing against a real Slurm controller, this repo builds on top of the upstream giovtorres/slurm-docker-cluster project, which provides a Docker Compose stack running a current, version-selectable Slurm (multi-arch, with pre-built images). It is a plain git checkout (not a submodule) into docker/slurm-cluster, which is git-ignored in this repo. docker/cluster.sh up automates checking it out and bringing it up (see docker/README.md for the full set of automated commands and the manual steps they replace), then install this extension (pip install -e .) into a JupyterLab 4 environment that shares the cluster's munge key and /etc/slurm so the Slurm client commands can connect. docker/jupyterhub/ builds on top of that cluster to also exercise per-user JupyterHub spawning against it.

Release files for jupyterlab-slurm 4.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterlab-slurm 4.1.0
File Size Uploaded
jupyterlab_slurm-4.1.0.tar.gz 2.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-slurm 4.1.0
File Interpreter ABI Platform
jupyterlab_slurm-4.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 MB

Release files / jupyterlab_slurm-4.1.0.tar.gz

Download URL jupyterlab_slurm-4.1.0.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
039eec5a7903844ab1585165bf016cf2037f7837b220c227745da786c610a617
BLAKE2b-256 checksum
How to use checksums
f62bceb1c97356901def06b14adfde2e988cd8a1ededa80f64fcbddc00cde0f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / jupyterlab_slurm-4.1.0-py3-none-any.whl

Download URL jupyterlab_slurm-4.1.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c7e36947cd4d1a1bff6739247fd3ddbe27016199efb5620e586c732440d45fce
BLAKE2b-256 checksum
How to use checksums
501ff840f60a2f34c290ce1b3012e97a209ba15cb833ef3889442b3a5a30bf4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

4.1.0 This release

2 release files

3.0.1

1 release file

2.0.0

1 release file

1.0.5

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page