SWAN JupyterHub spawner
Project description
SWAN Spawner
Spawner for JupyterHub that enables configuring a session with CVMFS/LCG stacks, support for GPU, oAuth tokens, etc. If Binder is used to configure the Docker image used, it reverts to the default upstream configuration. Works with both Docker and Kubernetes.
Installation
pip3 install swanspawner
Usage
Add to your JupyterHub config file
c.JupyterHub.spawner_class = 'swanspawner.SwanDockerSpawner'
If you deploy with Docker, or
c.JupyterHub.spawner_class = 'swanspawner.SwanKubeSpawner'
If you deploy with Kubernetes.
Jupyter Notebook environment variables set during spawn
| env |
|---|
| ROOT_LCG_VIEW_NAME |
| ROOT_LCG_VIEW_PLATFORM |
| USER_ENV_SCRIPT |
| ROOT_LCG_VIEW_PATH |
| USER |
| USER_ID |
| USER_GID |
| HOME |
| EOS_PATH_FORMAT |
| SERVER_HOSTNAME |
| MAX_MEMORY |
| JPY_USER |
| JPY_COOKIE_NAME |
| JPY_BASE_URL |
| JPY_HUB_PREFIX |
| JPY_HUB_API_URL |
| ACCESS_TOKEN |
| OAUTH_INSPECTION_ENDPOINT |
Spawn Form configuration
To configure custom form, please set path to config file as below
c.SwanSpawner.options_form_config = '<path>'
High level objects
{
"header": <options header text>,
"options": <array of options objects>
...
}
Options type label
{
"options": [
{
"type": "label",
"label": {
"value": <id of label>,
"text": <displayed text of label>
}
},
...
]
...
}
Options type selection
{
"options": [
{
"type": "selection",
"lcg": {
"value": <id of lcg>,
"text": <displayed text of lcg>
},
"platforms": [
{
"value": <id of platform>,
"text": <displayed text of platform>
}
...
],
"cores": [
{
"value": <id of cores selection>,
"text": <displayed text of cores selection>
}
...
],
"memory": [
{
"value": <id of memory selection>,
"text": <displayed text of memory selection>
}
...
],
"clusters": [
{
"value": <id of cluster>,
"text": <displayed text of cluster>
}
...
]
},
...
]
...
}
An example json file can be seen in options_form_config.json
Mount options
To mount EOS or CVMFS with SwanDockerSpawner (which requires a mount with propagation "shared"), a new configuration was introduced by upstream:
c.SwanSpawner.mounts = [
{
'source': '/eos',
'target': '/eos',
'type': 'bind',
'propagation': 'shared'
},
{
'source': '/cvmfs',
'target': '/cvmfs',
'type': 'bind',
'propagation': 'shared'
}
]
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 swanspawner-1.2.39.tar.gz.
File metadata
- Download URL: swanspawner-1.2.39.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba751247387506303b98cf8334aec974a07e7e091e3159c973fb071a4e84358
|
|
| MD5 |
bfbb31556a1e3d2e02195eb413383b65
|
|
| BLAKE2b-256 |
69a8dac2518475091edd2a9c12bd1762ad59ab5d316ca6ca5e2d5dc59f775372
|
Provenance
The following attestation bundles were made for swanspawner-1.2.39.tar.gz:
Publisher:
swan-ci-ca.yml on swan-cern/jupyterhub-extensions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swanspawner-1.2.39.tar.gz -
Subject digest:
3ba751247387506303b98cf8334aec974a07e7e091e3159c973fb071a4e84358 - Sigstore transparency entry: 1049762130
- Sigstore integration time:
-
Permalink:
swan-cern/jupyterhub-extensions@e61ff29880be1d5ab9840aff032dded4edd96e2c -
Branch / Tag:
refs/tags/SwanSpawner/v1.2.39 - Owner: https://github.com/swan-cern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
swan-ci-ca.yml@e61ff29880be1d5ab9840aff032dded4edd96e2c -
Trigger Event:
push
-
Statement type:
File details
Details for the file swanspawner-1.2.39-py3-none-any.whl.
File metadata
- Download URL: swanspawner-1.2.39-py3-none-any.whl
- Upload date:
- Size: 28.5 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 |
bb4ece53ed72d078206a22c16ead4870810fe362906e8bfc2f6b4f09b079ea95
|
|
| MD5 |
01e9a18a084fb967ead1a2b3bdfeb80e
|
|
| BLAKE2b-256 |
88951dd821bd28e5fb3366a92af056b6e5812349ddd5486e851e8ada111aa5e2
|
Provenance
The following attestation bundles were made for swanspawner-1.2.39-py3-none-any.whl:
Publisher:
swan-ci-ca.yml on swan-cern/jupyterhub-extensions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swanspawner-1.2.39-py3-none-any.whl -
Subject digest:
bb4ece53ed72d078206a22c16ead4870810fe362906e8bfc2f6b4f09b079ea95 - Sigstore transparency entry: 1049762218
- Sigstore integration time:
-
Permalink:
swan-cern/jupyterhub-extensions@e61ff29880be1d5ab9840aff032dded4edd96e2c -
Branch / Tag:
refs/tags/SwanSpawner/v1.2.39 - Owner: https://github.com/swan-cern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
swan-ci-ca.yml@e61ff29880be1d5ab9840aff032dded4edd96e2c -
Trigger Event:
push
-
Statement type: