spawner/README.md

57 lines
1.2 KiB
Markdown
Raw Normal View History

2024-01-29 11:31:49 +01:00
JupyterHub Batch Spawner for GLiCID
===================================
2024-02-23 15:44:06 +01:00
![Spawner form](img/spawner_form.png)
JupyterHub config
-----------------
In `jupyterhub_config.py`, add:
```txt
c.JupyterHub.spawner_class = 'glicid-spawner'
```
At the moment, you also need to change the `c.GlicidSpawner.batch_script`.
This will be be included in the future.
Contribution
------------
2024-01-29 11:31:49 +01:00
This package is managed by [Poetry](https://python-poetry.org/):
```bash
git clone https://gitlab.univ-nantes.fr/glicid/jupyter/spawner glicid-spawner
cd glicid-spawner
poetry install
poetry run pre-commit install
```
To test the spawner:
```bash
poetry run pytest
```
To lint and format the source code:
```bash
poetry run ruff check . --fix
poetry run ruff format
```
To render the form template (with live reload):
```bash
2024-02-20 15:13:14 +01:00
poetry run python -m render [--single-cluster]
```
To activate the virtual environement globally:
2024-01-29 11:31:49 +01:00
```bash
source .venv/bin/activate
```
2024-02-23 15:39:02 +01:00
External resources
------------------
2024-01-30 18:30:31 +01:00
- https://jupyterhub.readthedocs.io/en/stable/reference/spawners.html
2024-02-23 15:39:02 +01:00
- https://github.com/jupyterhub/batchspawner
- https://gitlab.com/idris-cnrs/jupyter/jupyter-jeanzay-spawner/
- https://gitlab.com/ifb-elixirfr/cluster/utils/slurmspawner/
- https://getbootstrap.com/docs/3.4/