Skip to content

Commit fe90f64

Browse files
committed
Recompile slurm if cuda enabled
1 parent 6c595ba commit fe90f64

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ansible/fatimage.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,24 @@
250250
name: cloudalchemy.grafana
251251
tasks_from: install.yml
252252

253+
- name: Add support for NVIDIA GPU auto detection to Slurm
254+
hosts: cuda
255+
become: yes
256+
tasks:
257+
- name: Get facts about Cuda installation
258+
import_role: cuda
259+
tasks_from: facts.yml
260+
261+
- name: Recompile and install slurm packages
262+
shell: |
263+
dnf download --source slurm-slurmd-ohpc
264+
rpm -i slurm-ohpc-23.11.10-320.ohpc.3.1.src.rpm
265+
dnf install -y @'Development Tools'
266+
cd /root/rpmbuild/SPECS
267+
dnf builddep -y slurm.spec
268+
rpmbuild -bb -D "_with_nvml --with-nvml=/usr/local/cuda-{{ cuda_facts_version_short }}/targets/x86_64-linux/"
269+
dnf reinstall /root/rpmbuild/RPMS/x86_64/*.rpm
270+
253271
- name: Run post.yml hook
254272
vars:
255273
appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"

0 commit comments

Comments
 (0)