Enforce GRES resources as lowercase for specific clusters
This commit is contained in:
parent
a723a2376e
commit
ae9ac12918
2 changed files with 12 additions and 3 deletions
|
@ -11,6 +11,10 @@ TEMPLATES = Environment(
|
|||
autoescape=select_autoescape(),
|
||||
)
|
||||
|
||||
GRES_CLUSTERS_LOWERCASE = [
|
||||
'waves',
|
||||
]
|
||||
|
||||
|
||||
def options_attrs(username: str) -> dict:
|
||||
"""Form options attributes."""
|
||||
|
@ -62,7 +66,10 @@ def options_from_form(formdata) -> dict:
|
|||
}
|
||||
|
||||
if gpu != 'None':
|
||||
options['gres'] = f'gpu:{gpu.lower()}'
|
||||
if cluster in GRES_CLUSTERS_LOWERCASE:
|
||||
gpu = gpu.lower()
|
||||
|
||||
options['gres'] = f'gpu:{gpu}'
|
||||
|
||||
if cluster:
|
||||
options['cluster'] = cluster
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue