跳转到主要内容

A JupyterLab extension to interface with the Slurm workload manager.

项目描述

Slurm JupyterLab 扩展

一个与Slurm工作负载管理器接口的JupyterLab扩展,提供简单直观的控制来查看和管理队列中的作业。

Slurm Extension

先决条件

  • JupyterLab >= 3.0
  • Node.js 14+
  • Slurm

安装

此扩展包括客户端JupyterLab扩展和服务器端Jupyter笔记本服务器扩展。使用以下命令行安装:

pip install jupyterlab_slurm

如果您正在运行5.2或更早版本的Notebook,请运行以下命令以启用服务器扩展:

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

启动JupyterLab后,可以在命令调色板下找到名为Slurm队列管理器的扩展,并在调色板和启动器的HPC工具部分中列出。

开发安装

JupyterLab开发文档中所述,对于labextension的开发安装,您可以在该目录中运行以下命令

设置本地Slurm集群

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

将jupyterlab-slurm安装到您的环境中

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

重启jupyterlab docker容器

docker compose restart jupyterlab

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

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

jupyterlab_slurm-3.0.1.tar.gz (448.4 kB 查看哈希值)

上传时间

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面