Skip to content

Commit 56ceece

Browse files
committed
pin nvidia driver version
1 parent b99b1e9 commit 56ceece

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

ansible/roles/cuda/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Requires OFED to be installed to provide required kernel-* packages.
1010

1111
- `cuda_repo_url`: Optional. URL of `.repo` file. Default is upstream for appropriate OS/architecture.
1212
- `cuda_nvidia_driver_stream`: Optional. Version of `nvidia-driver` stream to enable. This controls whether the open or proprietary drivers are installed and the major version. Changing this once the drivers are installed does not change the version.
13+
- `cuda_nvidia_driver_version`: Optional. Version of `nvidia-driver` module to install.
1314
- `cuda_packages`: Optional. Default: `['cuda', 'nvidia-gds', 'cmake', 'cuda-toolkit-12-8']`.
1415
- `cuda_package_version`: Optional. Default `latest` which will install the latest packages if not installed but won't upgrade already-installed packages. Use `'none'` to skip installing CUDA.
1516
- `cuda_persistenced_state`: Optional. State of systemd `nvidia-persistenced` service. Values as [ansible.builtin.systemd:state](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html#parameter-state). Default `started`.

ansible/roles/cuda/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cuda_repo_url: "https://developer.download.nvidia.com/compute/cuda/repos/rhel{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/cuda-rhel{{ ansible_distribution_major_version }}.repo"
22
cuda_nvidia_driver_stream: '570-open'
3+
cuda_nvidia_driver_version: '570.133.20-1'
34
cuda_package_version: '12.8.1-1'
45
cuda_version_short: '12.8'
56
cuda_packages:

ansible/roles/cuda/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
register: _cuda_driver_module_installed
3737

3838
- name: Install nvidia drivers
39-
ansible.builtin.command: dnf module install -y nvidia-driver
39+
ansible.builtin.command: "dnf module install -y nvidia-driver-{{ cuda_nvidia_driver_version}}"
4040
register: _cuda_driver_install
4141
when: "'No matching Modules to list' in _cuda_driver_module_installed.stderr"
4242
changed_when: "'Nothing to do' not in _cuda_driver_install.stdout"

0 commit comments

Comments
 (0)