Package: slurmformspawner
slurmformspawnerJupyterHub SlurmSpawner with a dynamic spawn formRequirementsPython >= 3.6JupyterHub >= 1.0batchspawner>=0.9.0.dev0cachetoolstraitletsConfigurationSlurmFormSpawnerVariableTypeDescriptionDefaultc.SlurmFormSpawner.disable_formCBoolDisable the spawner input form, use only default values insteadFalsec.SlurmFormSpawner.error_template_pathUnicodePath to the Jinja2 template of the error pageos.path.join(sys.prefix, 'share',  'slurmformspawner', 'templates', 'error.html')c.SlurmFormSpawner.submit_template_pathUnicodePath to the Jinja2 template of the submit fileos.path.join(sys.prefix, 'share', 'slurmformspawner', 'templates', 'submit.sh')c.SlurmFormSpawner.ui_argsDictDictionary of dictionaries describing the UI optionsrefer toui_argssectionui_argsui_argsis a dictionary where the keys are labels that will be re-used inSbatchForm.uiand 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 formargs(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 workHere 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',
        'args': ['--SingleUserNotebookApp.default_url=/terminal/1']
    },
    'rstudio' : {
        'name': 'RStudio',
        'args': ['--SingleUserNotebookApp.default_url=/rstudio'],
        'modules': ['rstudio-server']
    }
}SbatchFormVariableTypeDescriptionDefaultc.SbatchForm.runtimeDict({'max', 'min', 'step', 'lock', 'def'})Runtime widget parametersrefer toform.pyc.SbatchForm.nprocsDict({'max', 'min', 'step', 'lock', 'def'})Number of cores widget parametersrefer toform.pyc.SbatchForm.memoryDict({'max', 'min', 'step', 'lock', 'def'})Memory (MB) widget parametersrefer toform.pyc.SbatchForm.oversubscribeDict({'def', 'lock'})Oversubscribe widget parametersrefer toform.pyc.SbatchForm.gpusDict({'def', 'choices', 'lock'})GPUs widget parametersrefer toform.pyc.SbatchForm.uiDict({'def', 'choices', 'lock'})User interface widget parametersrefer toform.pyc.SbatchForm.reservationDict({'def', 'choices', 'lock'})Reservation widget parametersrefer toform.pyc.SbatchForm.accountDict({'def', 'choices', 'lock'})Account widget parametersrefer toform.pyc.SbatchForm.partitionDict({'def', 'choices', 'lock'})Slurm partition parametersrefer toform.pyc.SbatchForm.form_template_pathUnicodePath to the Jinja2 template of the formos.path.join(sys.prefix, 'share',  'slurmformspawner', 'templates', 'form.html')SlurmAPIVariableTypeDescriptionDefaultc.SlurmAPI.info_cache_ttlIntegerSlurm sinfo output cache time-to-live (seconds)300c.SlurmAPI.acct_cache_ttlIntegerSlurm sacct output cache time-to-live (seconds)300c.SlurmAPI.acct_cache_sizeIntegerSlurm sacct output cache size (number of users)100c.SlurmAPI.res_cache_ttlIntegerSlurm scontrol (reservations) output cache time-to-live (seconds)300screenshot