Start a remote Kernel via ssh in a slurm job
Project description
Slurm SSH Provisioner
What is this package
This package is a Jupyter Kernel Provisioner.
It uses ssh tunnels to launch a remote kernel in a slurm job and connect to it.
Once configured, on the Jupyter Notebook / Lab interface, you can just select a kernel using this provisioner and it will set up everything accordingly.
Setup
1 - Build a remote wrapper script
This remote wrapper will be called when we want to launch the kernel. Thus, it should:
- Start a slurm job that will start a kernel (the connection file should be named .../kernel-{slurm_job_id}.json, thus the command inside a batch script could be
python -m ipykernel_launcher -f=/tmp/kernel-${SLURM_JOB_ID}.json) - Wait for the job to start
- Return the slurm job id
2 - Setup a kernel
This is the kernel that will use the slurm-ssh-provisioner. It will be displayed in the Notebook / Lab interface.
#~/.local/share/jupyter/kernels/slurm-ssh/kernel.json
{
"display_name": "Python 3 (Slurm SSH)",
"language": "python",
"metadata": {
"kernel_provisioner": {
"provisioner_name": "slurm-ssh-provisioner",
"config": {
"host": "xxx.xxx.xxx.xxx",
"username": "debian",
"first_local_port": 9000,
"wrapper_cmd": "bash wrapper.sh"
}
}
}
}
3 - Voilà
You should now be able to use this new kernel.
Use jupyter kernelspec list to check your kernel is detected.
Use jupyter kernelspec provisioners to check that slurm-ssh-provisioner is installed.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyter_slurm_ssh_provisioner-0.2.0.tar.gz.
File metadata
- Download URL: jupyter_slurm_ssh_provisioner-0.2.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93d8e4f9577b79bce3c6c2fa84d5861ff9a34bf4b0e24dc7f7b9e33cf8d9d981
|
|
| MD5 |
ad2a7cb7bc2b1c5e405d65d7d7161a70
|
|
| BLAKE2b-256 |
22443e8225a80be042a5b0462fb63bab99bc4e49d466446dcf74befd5cdec46f
|
Provenance
The following attestation bundles were made for jupyter_slurm_ssh_provisioner-0.2.0.tar.gz:
Publisher:
python-publish.yml on Ninichus/jupyter_slurm_ssh_provisioner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_slurm_ssh_provisioner-0.2.0.tar.gz -
Subject digest:
93d8e4f9577b79bce3c6c2fa84d5861ff9a34bf4b0e24dc7f7b9e33cf8d9d981 - Sigstore transparency entry: 262859785
- Sigstore integration time:
-
Permalink:
Ninichus/jupyter_slurm_ssh_provisioner@9fac1ef8a67e31542da90c3734dd747d92fa9569 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Ninichus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9fac1ef8a67e31542da90c3734dd747d92fa9569 -
Trigger Event:
release
-
Statement type:
File details
Details for the file jupyter_slurm_ssh_provisioner-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: jupyter_slurm_ssh_provisioner-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a902eb3f24751e7b86bff3f2d7e496642b01ef980d908723fbca736c33886673
|
|
| MD5 |
58a1688e0fa2c47867b81d6c8ae32929
|
|
| BLAKE2b-256 |
9ec6989510140f1c93eb5caa3f326bf07e3581908f098625ef8e74a410adeb94
|
Provenance
The following attestation bundles were made for jupyter_slurm_ssh_provisioner-0.2.0-py2.py3-none-any.whl:
Publisher:
python-publish.yml on Ninichus/jupyter_slurm_ssh_provisioner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_slurm_ssh_provisioner-0.2.0-py2.py3-none-any.whl -
Subject digest:
a902eb3f24751e7b86bff3f2d7e496642b01ef980d908723fbca736c33886673 - Sigstore transparency entry: 262859789
- Sigstore integration time:
-
Permalink:
Ninichus/jupyter_slurm_ssh_provisioner@9fac1ef8a67e31542da90c3734dd747d92fa9569 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Ninichus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9fac1ef8a67e31542da90c3734dd747d92fa9569 -
Trigger Event:
release
-
Statement type: