A JupyterLab extension to interface with the Slurm workload manager.
项目描述
Slurm JupyterLab 扩展
一个与Slurm工作负载管理器接口的JupyterLab扩展,提供简单直观的控制来查看和管理队列中的作业。
先决条件
- 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的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 40157e9dd4e67acf43aab17e9c4faca922da8364181bc321551550768d5dd6a2 |
|
MD5 | 4c95b6d135559dab51cbefcae64d7a85 |
|
BLAKE2b-256 | 7caf6bb4065a46a298d95c72aefc20d2353498ff79b5a1b0b62af8520853b22b |