{"id":17086710,"url":"https://github.com/cmd-ntrf/slurmformspawner","last_synced_at":"2025-04-12T21:08:19.276Z","repository":{"id":41797014,"uuid":"183241190","full_name":"cmd-ntrf/slurmformspawner","owner":"cmd-ntrf","description":"JupyterHub SlurmSpawner with a dynamic spawn form","archived":false,"fork":false,"pushed_at":"2025-01-20T20:14:43.000Z","size":346,"stargazers_count":7,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T15:12:55.806Z","etag":null,"topics":["jupyterhub"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmd-ntrf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-24T14:02:56.000Z","updated_at":"2025-01-20T20:14:46.000Z","dependencies_parsed_at":"2024-06-12T00:43:26.113Z","dependency_job_id":null,"html_url":"https://github.com/cmd-ntrf/slurmformspawner","commit_stats":{"total_commits":140,"total_committers":1,"mean_commits":140.0,"dds":0.0,"last_synced_commit":"8669a42e1a308810fd480eebcacecb63e870c577"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-ntrf%2Fslurmformspawner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-ntrf%2Fslurmformspawner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-ntrf%2Fslurmformspawner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-ntrf%2Fslurmformspawner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmd-ntrf","download_url":"https://codeload.github.com/cmd-ntrf/slurmformspawner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281369,"owners_count":21077423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyterhub"],"created_at":"2024-10-14T13:29:22.069Z","updated_at":"2025-04-12T21:08:19.256Z","avatar_url":"https://github.com/cmd-ntrf.png","language":"Python","readme":"# slurmformspawner\nJupyterHub SlurmSpawner with a dynamic spawn form\n\n## Requirements\n\n- Python \u003e= 3.7\n- JupyterHub \u003e= 4.0.0\n- batchspawner\u003e= 1.3.0\n- cachetools\n- traitlets\n\n## Configuration\n\n### SlurmFormSpawner\n\n| Variable                          | Type    | Description                                     | Default |\n| --------------------------------- | :------ | :---------------------------------------------- | ------- |\n| `c.SlurmFormSpawner.disable_form`    | `CBool` | Disable the spawner input form, use only default values instead | `False` |\n| `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')` |\n| `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')` |\n| `c.SlurmFormSpawner.ui_args` | `Dict` | Dictionary of dictionaries describing the UI options | refer to `ui_args` section |\n\n#### `ui_args`\n\n`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.\nEach option dictionary can have the following keys:\n- `name` (required): string that will appear in the Spawner form\n- `url`  (optional): url user is being redirected to after spawning the single-user server (refer to `JUPYTERHUB_DEFAULT_URL` documentation)\n- `args` (optional): list of flags and options that will be appended to jupyter single-user command that should redirect to the UI.\n- `modules` (optional): list of module names that needs to be loaded to make the user interface work\n\nHere is an example of a dictionary that would configure Jupyter Notebook, a terminal and RStudio.\n```\nc.SlurmFormSpawner.ui_args = {\n    'notebook' : {\n        'name': 'Jupyter Notebook'\n    },\n    'terminal' : {\n        'name': 'Terminal',\n        'url': '/terminal/1'\n    },\n    'rstudio' : {\n        'name': 'RStudio',\n        'url': '/rstudio',\n        'modules': ['rstudio-server']\n    }\n}\n```\n\n### SbatchForm\n\n| Variable                          | Type    | Description                                     | Default |\n| --------------------------------- | :------ | :---------------------------------------------- | ------- |\n| `c.SbatchForm.runtime`  | `Dict({'max', 'min', 'step', 'lock', 'def'})` | Runtime widget parameters  | refer to `form.py`   |\n| `c.SbatchForm.nprocs`  | `Dict({'max', 'min', 'step', 'lock', 'def'})` | Number of cores widget parameters | refer to `form.py` |\n| `c.SbatchForm.memory`  | `Dict({'max', 'min', 'step', 'lock', 'def'})` | Memory (MB) widget parameters | refer to `form.py`    |\n| `c.SbatchForm.oversubscribe`  | `Dict({'def', 'lock'})` | Oversubscribe widget parameters | refer to `form.py`  |\n| `c.SbatchForm.gpus`  | `Dict({'def', 'choices', 'lock'})` | GPUs widget parameters | refer to `form.py`  |\n| `c.SbatchForm.ui`  | `Dict({'def', 'choices', 'lock'})` | User interface widget parameters | refer to `form.py`  |\n| `c.SbatchForm.reservation`  | `Dict({'def', 'choices', 'lock'})` | Reservation widget parameters | refer to `form.py`  |\n| `c.SbatchForm.account`  | `Dict({'def', 'choices', 'lock'})` | Account widget parameters | refer to `form.py`  |\n| `c.SbatchForm.partition` | `Dict({'def', 'choices', 'lock'})` | Slurm partition parameters | refer to `form.py` |\n| `c.SbatchForm.form_template_path` | `Unicode` | Path to the Jinja2 template of the form | `os.path.join(sys.prefix, 'share',  'slurmformspawner', 'templates', 'form.html')` |\n\n### SlurmAPI\n\n| Variable                          | Type      | Description                                                       | Default |\n| --------------------------------- | :-------- | :---------------------------------------------------------------- | ------- |\n| `c.SlurmAPI.info_cache_ttl`       | `Integer` | Slurm sinfo output cache time-to-live (seconds)                   | 300     |\n| `c.SlurmAPI.acct_cache_ttl`       | `Integer` | Slurm sacct output cache time-to-live (seconds)                   | 300     |\n| `c.SlurmAPI.acct_cache_size`      | `Integer` | Slurm sacct output cache size (number of users)                   | 100     |\n| `c.SlurmAPI.res_cache_ttl`        | `Integer` | Slurm scontrol (reservations) output cache time-to-live (seconds) | 300     |\n\n## screenshot\n\n![form_screenshot](screenshot.png \"Form screenshot\")\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmd-ntrf%2Fslurmformspawner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmd-ntrf%2Fslurmformspawner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmd-ntrf%2Fslurmformspawner/lists"}