Skip to main content

A JupyterLab extension to interface with the Slurm workload manager.

Project description

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 >= 3.0
  • Node.js 14+
  • Slurm

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 Queue Manager, 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:

Setup a local slurm cluster

git clone https://github.com/giovtorres/slurm-docker-cluster
cd slurm-docker-cluster
git clone --branch lab3 https://github.com/NERSC/jupyterlab-slurm.git
cp jupyterlab-slurm/slurm_cluster/docker-compose.yml .
# from slurm-docker-cluster README
docker build -t slurm-docker-cluster:19.05.1 .
# if you encounter an error with the PGP key step
# update line 46 with gpg --keyserver pgp.mit.edu ...
# this will build the jupyterlab image minimal-notebook with a slurm client
docker-compose build
# start the cluster
docker-compose up -d
# register the slurm cluster
./register_cluster.sh
# run munged on the jupyterlab instance to get the slurm commands to connect
docker-compose exec jupyterlab bash
runuser -u slurm -- munged
# test that squeue comes back with a header, if it gets stuck you can't connect
squeue

Install jupyterlab-slurm into your environment

docker-compose exec -u jovyan jupyterlab bash
cd /usr/local/jupyterlab-slurm/
# install jupyter_packaging which is a missing dependency
pip install jupyter_packaging
# this command takes a while the first it is run
pip install -e .
# point the labextension dev install at current dir
jupyter labextension develop --overwrite .

# rerun this if there are updates:
jlpm run build

Restart the jupyterlab docker container

docker compose restart jupyterlab

# rerun munged on the jupyterlab instance
docker compose exec jupyterlab bash
runuser -u slurm -- munged

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab_slurm-3.0.1.tar.gz (448.4 kB view details)

Uploaded Source

File details

Details for the file jupyterlab_slurm-3.0.1.tar.gz.

File metadata

  • Download URL: jupyterlab_slurm-3.0.1.tar.gz
  • Upload date:
  • Size: 448.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for jupyterlab_slurm-3.0.1.tar.gz
Algorithm Hash digest
SHA256 40157e9dd4e67acf43aab17e9c4faca922da8364181bc321551550768d5dd6a2
MD5 4c95b6d135559dab51cbefcae64d7a85
BLAKE2b-256 7caf6bb4065a46a298d95c72aefc20d2353498ff79b5a1b0b62af8520853b22b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page