LIP-Computing.ansible-role-nvidia
Ansible Role to Install NVIDIA Drivers
This role installs the NVIDIA driver on machines with GPUs, including both physical and virtual machines.
Supported Operating Systems: CentOS 7 and Ubuntu 18.04.
Requirements
Your machine or virtual machine must have an NVIDIA GPU, which you can check by running:
lspci | grep NVIDIA
Installing the Role
You can install the role directly from GitHub with this command:
ansible-galaxy install git+https://github.com/LIP-Computing/ansible-role-nvidia.git
Or from Ansible Galaxy:
ansible-galaxy install -f LIP-Computing.ansible-role-nvidia
Role Variables
You may need to adjust these variables based on your machine:
nvidia_driver_version: 440.33.01- This is the version of the NVIDIA driver. You can check the default value indefaults/main.ymland see a list of valid versions.kmod_install: true- This installs the kernel module. Use only for physical machines and VMs.dev_create: false- This runs a script to create devices on the host, but only ifkmod_install: true.nv_persistence: true- This sets NVIDIA persistence mode with the commandnvidia-smi --persistence-mode=1.
The variable kmod_install determines if the NVIDIA kernel module should be installed. For Docker images, set this to false. For physical machines or VMs, set it to true.
You do not need to change these pre-configured variables:
base_url: The base URL for downloading NVIDIA drivers.nvidia_driver: The filename of the NVIDIA driver, depending onnvidia_driver_version.nvidia_url: The full URL for the NVIDIA driver, depending onbase_urlandnvidia_driver.
Example Playbook
Here is an example of a playbook to deploy driver version 440.33.01 on a virtual machine:
- hosts: servers
roles:
- { role: LIP-Computing.ansible-role-nvidia, nvidia_driver_version: 440.33.01, kmod_install: true }
License
Apache v2
Author Information
- Mario David: mariojmdavid@gmail.com
- LIP Lisbon: http://www.lip.pt
- Projects:
- Indigo DataCloud: https://www.indigo-datacloud.eu/
- DEEP Hybrid Datacloud: https://deep-hybrid-datacloud.eu/
- EOSC Synergy: https://www.eosc-synergy.eu/
Installa
ansible-galaxy install LIP-Computing.ansible-role-nvidiaLicenza
apache-2.0
Download
211
Proprietario
LIP Computing group
