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.
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
SlurmCommandHandlerto execute shell commands and handle errors. - Job details use a specialized
JobDetailsHandlerthat normalizes data from bothscontrolandsacct.
- Handlers are located in
- Frontend (TypeScript/React): A JupyterLab extension that provides the UI.
- Built with React, MUI (Material UI), and
ag-grid-reactfor high-performance table rendering. - Main components:
SlurmWidget(top-level),SqueueDataTable(live queue),SlurmJobHistory(completed jobs), andJobDetailsPanel(detailed inspection). - State management handles polling, selection snapshots, and navigation between job details.
- Built with React, MUI (Material UI), and
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)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyterlab_slurm-4.1.0.tar.gz | 2.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|