Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions environments/site/hooks/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
group: root
mode: 0644

- name: Slurm nodegroup config
hosts: control
tags: openhpc
tasks:
- set_fact: _openhpc_nodegroups={{ openhpc_nodegroups }}
- name: Update node groups from nodegroups_map
set_fact: _openhpc_nodegroups={{ (_openhpc_nodegroups | selectattr(item.key, item.test, *item.args|default([]), **item.kwargs|default({}) ) | map("combine", item.inject)) + (_openhpc_nodegroups | rejectattr(item.key, item.test, *item.args|default([]), **item.kwargs|default({}) )) }}
loop: "{{ nodegroups_map }}"
- set_fact: openhpc_nodegroups={{ _openhpc_nodegroups }}

- name: Enable and start service tmp.mount
hosts: builder
become: true
Expand Down
9 changes: 9 additions & 0 deletions environments/site/inventory/group_vars/all/openhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ openhpc_config_extra:
AccountingStorageEnforce: 'associations,limits,qos,safe'

openhpc_job_maxtime: '1-0'

nodegroups_map:
- key: "name"
test: "match"
args: ["gpu-.*"]
inject:
gres:
- conf: "gpu:A100:1"
file: "/dev/nvidia0"