LIP-Computing.ansible-role-nvidia

License Build Status

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 in defaults/main.yml and 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 if kmod_install: true.
  • nv_persistence: true - This sets NVIDIA persistence mode with the command nvidia-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 on nvidia_driver_version.
  • nvidia_url: The full URL for the NVIDIA driver, depending on base_url and nvidia_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

Informazioni sul progetto

NVIDIA GPUs

Installa
ansible-galaxy install LIP-Computing.ansible-role-nvidia
Licenza
apache-2.0
Download
199
Proprietario
LIP Computing group