stackhpc / ansible-slurm-appliance

A Slurm-based HPC workload management environment, driven by Ansible.
36 stars 15 forks source link

Make nvidia-driver install idempotent #315

Closed sjpb closed 8 months ago

sjpb commented 9 months ago

Makes the install of the nvidia-driver module by the CUDA role idempotent, so that the module's packages are not updated by rerunning the role.

If using the nvidia-driver:latest-dkms module stream, running dnf module install nvidia-driver will update drivers if more recent ones become available. This is in contrast to non-modular dnf install $package_name behaviour, where installed packages are not updated by rerunning the command.

This PR changes the role to check if a nvidia-driver module is enabled, and only if not, search for the highest-numbered dkms-variant module stream and enable that.