Jupyter slurm kernel provisioner
Project description
Installation
pip install slurm-provisioner
Overview
The slurm provisioner is a subclass of `jupyter_client.KernelProvisionerBase <https://github.com/jupyter/jupyter_client/blob/v7.4.2/jupyter_client/provisioning/provisioner_base.py#L24>`__. Its area of use is any slurm-based HPC system. However, it was written to be used within the Juelich Supercomputing Centre, which uses a script called jutil to create a user-specific environment based on a project. You may have to update scripts/slurmel_allocate to use it on any other HPC system. It allows users to start their jupyter kernel on any partition, while their notebook server is running on an interactive login node. This offers a separation between code execution and user interface. The slurm provisioner will not use its ipykernel argv configuration but is meant to be a wrapper for any existing kernel. It is recommended to use this kernel with the option `--KernelRestarter.restart_limit=0 <https://github.com/jupyter/jupyter_client/blob/v7.4.2/jupyter_client/restarter.py#L43>`__ to avoid unsought compute time and costs.
Configuration
Configure a kernel.json file in your $HOME. It is not recommended to define the kernel globally, since the configuration is user-specific.
Options
project [required]: Used for correct budgeting of compute time.
partition [required]: specify the slurm partition
nodes [required]: specify the number of nodes
runtime [required]: specify the runtime in minutes
kernel_argv [required]: copy & paste this from the kernel you want to run
gpus [optional]: specify the number of GPUs, if the partition supports GPUs
reservation [optional]: specify the slurm reservation, if you have one
jobid [optional]: specify a pre-existing slurm allocation and start your kernel there. Without this, a new allocation for each kernel will be created.
node [optional]: specify a node in your pre-existing allocation
Example kernel.json
.local/share/jupyter/kernels/slurmel/kernel.json
{ "display_name": "Slurm Kernel", "language": "python", "metadata": { "debugger": true, "kernel_provisioner": { "config": { "gpus": "0", "nodes": "2", "partition": "batch", "project": "...", "reservation": "None", "runtime": 30, "jobid": "None", "node": "None", "kernel_argv": [ "~/.local/share/jupyter/kernels/my_kernel/kernel.sh", "-f", "{connection_file}" ] }, "provisioner_name": "slurm-provisioner" } } }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jupyter-slurm-provisioner-0.6.0.tar.gz
.
File metadata
- Download URL: jupyter-slurm-provisioner-0.6.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24141dc4abfb009d424837a5d78159c2b63e0243d63618cacebcf4f23edc101f |
|
MD5 | e69fbefe756b0282832a77e00a350681 |
|
BLAKE2b-256 | 1af71336205f53e79ffb5e7acbac42be2656cb2fe43fe750b561a28150213254 |
File details
Details for the file jupyter_slurm_provisioner-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: jupyter_slurm_provisioner-0.6.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d454aa68cbb5e9a018bab5e2b3460901b6e78e47a32fb695c44ab6fd3d6f98 |
|
MD5 | 7bfe27f8372086160a1d5d08b6971363 |
|
BLAKE2b-256 | 58333444e9a83a2744eb9b7b65a06969d688e1e48ef3823b0988d3de048e3af1 |