slurmformspawner: JupyterHub SlurmSpawner with a dynamic spawn form
Project description
slurmformspawner
JupyterHub SlurmSpawner with a dynamic spawn form
Requirements
- Python >= 3.7
- JupyterHub >= 4.0.0
- batchspawner>= 1.3.0
- cachetools
- traitlets
Configuration
SlurmFormSpawner
| Variable | Type | Description | Default |
|---|---|---|---|
c.SlurmFormSpawner.disable_form |
CBool |
Disable the spawner input form, use only default values instead | False |
c.SlurmFormSpawner.error_template_path |
Unicode |
Path to the Jinja2 template of the error page | os.path.join(sys.prefix, 'share', 'slurmformspawner', 'templates', 'error.html') |
c.SlurmFormSpawner.submit_template_path |
Unicode |
Path to the Jinja2 template of the submit file | os.path.join(sys.prefix, 'share', 'slurmformspawner', 'templates', 'submit.sh') |
c.SlurmFormSpawner.ui_args |
Dict |
Dictionary of dictionaries describing the UI options | refer to ui_args section |
c.SlurmFormSpawner.profile_args |
Dict |
Dictionary of dictionaries describing profiles | refer to profile_args section |
ui_args
ui_args is a dictionary where the keys are labels that will be re-used in SbatchForm.ui and the values are dictionnaries describing how to launch the user interface.
Each option dictionary can have the following keys:
name(required): string that will appear in the Spawner formurl(optional): url user is being redirected to after spawning the single-user server (refer toJUPYTERHUB_DEFAULT_URLdocumentation)args(optional): list of flags and options that will be appended to jupyter single-user command that should redirect to the UI.modules(optional): list of module names that needs to be loaded to make the user interface work
Here is an example of a dictionary that would configure Jupyter Notebook, a terminal and RStudio.
c.SlurmFormSpawner.ui_args = {
'notebook' : {
'name': 'Jupyter Notebook'
},
'terminal' : {
'name': 'Terminal',
'url': '/terminal/1'
},
'rstudio' : {
'name': 'RStudio',
'url': '/rstudio',
'modules': ['rstudio-server']
}
}
profile_args
profile_args is a dictionary where the keys are labels that are used in a JavaScript function to set values of the form according values specified in the params sub dictionary.
Each dictionary has the following keys:
name(required): string that will appear in the Spawner formparams(required): dictionary that can specify the value of each of the parameters in SbatchForm (see SbatchForm section).
Here is an example of how you could define profiles
c.SlurmFormSpawner.profile_args = {
'shell' : {
'name': 'Shell session',
'params': {
'nprocs': 1,
'oversubscribe': True,
'ui': 'terminal'
}
},
'parallel_testing' : {
'name': 'Parallel Testing',
'params': {
'nprocs': 8,
'oversubscribe': False,
'ui': 'lab',
'runtime': 1,
}
}
}
SbatchForm
| Variable | Type | Description | Default |
|---|---|---|---|
c.SbatchForm.runtime |
Dict({'max', 'min', 'step', 'lock', 'def'}) |
Runtime widget parameters | refer to form.py |
c.SbatchForm.nprocs |
Dict({'max', 'min', 'step', 'lock', 'def'}) |
Number of cores widget parameters | refer to form.py |
c.SbatchForm.memory |
Dict({'max', 'min', 'step', 'lock', 'def'}) |
Memory (MB) widget parameters | refer to form.py |
c.SbatchForm.oversubscribe |
Dict({'def', 'lock'}) |
Oversubscribe widget parameters | refer to form.py |
c.SbatchForm.gpus |
Dict({'def', 'choices', 'lock'}) |
GPUs widget parameters | refer to form.py |
c.SbatchForm.ui |
Dict({'def', 'choices', 'lock'}) |
User interface widget parameters | refer to form.py |
c.SbatchForm.profile |
Dict({'def', 'choices', 'lock'}) |
User interface widget parameters | refer to form.py |
c.SbatchForm.reservation |
Dict({'def', 'choices', 'lock'}) |
Reservation widget parameters | refer to form.py |
c.SbatchForm.account |
Dict({'def', 'choices', 'lock'}) |
Account widget parameters | refer to form.py |
c.SbatchForm.partition |
Dict({'def', 'choices', 'lock'}) |
Slurm partition parameters | refer to form.py |
c.SbatchForm.feature |
Dict({'def', 'choices', 'lock'}) |
Slurm feature (constraint) parameters | refer to form.py |
c.SbatchForm.form_template_path |
Unicode |
Path to the Jinja2 template of the form | os.path.join(sys.prefix, 'share', 'slurmformspawner', 'templates', 'form.html') |
SlurmAPI
| Variable | Type | Description | Default |
|---|---|---|---|
c.SlurmAPI.info_cache_ttl |
Integer |
Slurm sinfo output cache time-to-live (seconds) | 300 |
c.SlurmAPI.acct_cache_ttl |
Integer |
Slurm sacct output cache time-to-live (seconds) | 300 |
c.SlurmAPI.acct_cache_size |
Integer |
Slurm sacct output cache size (number of users) | 100 |
c.SlurmAPI.res_cache_ttl |
Integer |
Slurm scontrol (reservations) output cache time-to-live (seconds) | 300 |
screenshot
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 slurmformspawner-2.11.0.tar.gz.
File metadata
- Download URL: slurmformspawner-2.11.0.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d35f636b90c550b62511774ef06845c65fee818e119ea48ea02230b8dd0b1e8b
|
|
| MD5 |
6d6515ec6ccbf27b0965d20752f5cf7d
|
|
| BLAKE2b-256 |
f7df030219f08a7fe6ebc7d6cdd04030b8c2dbb29593f2fddf0967434c453811
|
Provenance
The following attestation bundles were made for slurmformspawner-2.11.0.tar.gz:
Publisher:
main.yml on cmd-ntrf/slurmformspawner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slurmformspawner-2.11.0.tar.gz -
Subject digest:
d35f636b90c550b62511774ef06845c65fee818e119ea48ea02230b8dd0b1e8b - Sigstore transparency entry: 845192459
- Sigstore integration time:
-
Permalink:
cmd-ntrf/slurmformspawner@993288d98f91230bcbfce27ca548030cfe938249 -
Branch / Tag:
refs/tags/v2.11.0 - Owner: https://github.com/cmd-ntrf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@993288d98f91230bcbfce27ca548030cfe938249 -
Trigger Event:
release
-
Statement type:
File details
Details for the file slurmformspawner-2.11.0-py3-none-any.whl.
File metadata
- Download URL: slurmformspawner-2.11.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b2b316ecdf911311aeda365513ff51210321a0f7096d1727887befe3a3cf6a1
|
|
| MD5 |
eb4c9b7812e6e3cbd456ed879c95d9d0
|
|
| BLAKE2b-256 |
f0cfa6114924e2cfc7a2372cf5df0f9d48accdbf734e0b93416ce36ac3bbb0a3
|
Provenance
The following attestation bundles were made for slurmformspawner-2.11.0-py3-none-any.whl:
Publisher:
main.yml on cmd-ntrf/slurmformspawner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slurmformspawner-2.11.0-py3-none-any.whl -
Subject digest:
1b2b316ecdf911311aeda365513ff51210321a0f7096d1727887befe3a3cf6a1 - Sigstore transparency entry: 845192467
- Sigstore integration time:
-
Permalink:
cmd-ntrf/slurmformspawner@993288d98f91230bcbfce27ca548030cfe938249 -
Branch / Tag:
refs/tags/v2.11.0 - Owner: https://github.com/cmd-ntrf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@993288d98f91230bcbfce27ca548030cfe938249 -
Trigger Event:
release
-
Statement type: