Skip to content
Snippets Groups Projects
Commit f2198631 authored by Simon Michnowicz's avatar Simon Michnowicz Committed by Chris Hines
Browse files

change the way a script is called to determine number of GPUs

Unfortunately this new way also produced weird Python errors, which
could only be fixed by running as root (which is probably problem with original way)
parent a288ef90
No related branches found
No related tags found
1 merge request!136change the way a script is called to determine number of GPUs
This commit is part of merge request !136. Comments created here will be created in the context of that merge request.
......@@ -85,10 +85,15 @@
when: slurm_gres_check is defined
check_mode: no
#as we change home directory earlier gather_facts causes the 'script' role to fail. so we do the probe this way
- name: Copy Gres - Test script to /tmp
copy: src="scripts/nvidia-probe.py" dest="/tmp" mode="u=rwx,g=rx,o=rx"
- name: Gres - Test for Nvidia devices
script: scripts/nvidia-probe.py
shell: /tmp/nvidia-probe.py
register: probeOutput
check_mode: no
sudo: true
- name: get cpu count
shell: 'lscpu | grep "On-line CPU" | cut -f 2 -d ":" | sed "s/\ *//g"'
......@@ -98,6 +103,9 @@
- name: "set nvidiaprobe slurm_gres_list"
set_fact: "slurm_gres_list={{ probeOutput.stdout }}"
- name: simon debug of slurm_gres_list
debug: msg="List of slurm_gres_list is {{ slurm_gres_list }}"
- name: template gres.conf file
template: src="gres.conf.j2" dest={{ slurm_dir }}/etc/gres.conf mode=644
sudo: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment