Socket
Socket
Sign inDemoInstall

slurmformspawner

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    slurmformspawner

slurmformspawner: JupyterHub SlurmSpawner with a dynamic spawn form


Maintainers
1

Readme

slurmformspawner

JupyterHub SlurmSpawner with a dynamic spawn form

Requirements

  • Python >= 3.7
  • JupyterHub >= 4.0.0
  • batchspawner>= 1.3.0
  • cachetools
  • traitlets

Configuration

SlurmFormSpawner

VariableTypeDescriptionDefault
c.SlurmFormSpawner.disable_formCBoolDisable the spawner input form, use only default values insteadFalse
c.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 to ui_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 form
  • url (optional): url user is being redirected to after spawning the single-user server (refer to JUPYTERHUB_DEFAULT_URL documentation)
  • 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']
    }
}

SbatchForm

VariableTypeDescriptionDefault
c.SbatchForm.runtimeDict({'max', 'min', 'step', 'lock', 'def'}) Runtime widget parametersrefer to form.py
c.SbatchForm.nprocsDict({'max', 'min', 'step', 'lock', 'def'}) Number of cores widget parametersrefer to form.py
c.SbatchForm.memoryDict({'max', 'min', 'step', 'lock', 'def'})Memory (MB) widget parametersrefer to form.py
c.SbatchForm.oversubscribeDict({'def', 'lock'})Oversubscribe widget parametersrefer to form.py
c.SbatchForm.gpusDict({'def', 'choices', 'lock'})GPUs widget parametersrefer to form.py
c.SbatchForm.uiDict({'def', 'choices', 'lock'})User interface widget parametersrefer to form.py
c.SbatchForm.reservationDict({'def', 'choices', 'lock'})Reservation widget parametersrefer to form.py
c.SbatchForm.accountDict({'def', 'choices', 'lock'})Account widget parametersrefer to form.py
c.SbatchForm.partitionDict({'def', 'choices', 'lock'})Slurm partition parametersrefer to form.py
c.SbatchForm.form_template_pathUnicodePath to the Jinja2 template of the formos.path.join(sys.prefix, 'share', 'slurmformspawner', 'templates', 'form.html')

SlurmAPI

VariableTypeDescriptionDefault
c.SlurmAPI.info_cache_ttlInteger Slurm sinfo output cache time-to-live (seconds)300
c.SlurmAPI.acct_cache_ttlInteger Slurm sacct output cache time-to-live (seconds)300
c.SlurmAPI.acct_cache_sizeInteger Slurm sacct output cache size (number of users)100
c.SlurmAPI.res_cache_ttlInteger Slurm scontrol (reservations) output cache time-to-live (seconds)300

screenshot

form_screenshot

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc