Giter Site home page Giter Site logo

ansible-role-nvidia-driver's Introduction

ansible-role-nvidia-driver

An Ansible role to install the NVIDIA driver from the NVIDIA CUDA repositories.

Requirements

In the process of installing the NVIDIA driver, this role will reboot the nodes where it runs. Because of this, we strongly recommend that you run ansible-playbook from a separate node than the GPU nodes where you are installing the driver.

If you attempt to run Ansible on the same node where you are installing the driver, this role will either:

  • Refuse to proceed with an error like Running reboot with local connection would reboot the control node (if running with the local connection)
  • Reboot the node you're running on, interrupting the playbook execution! (if running the an ssh connection against localhost)

Installing

This role can be installed using Ansible Galaxy:

$ ansible-galaxy install nvidia.nvidia_driver

Role variables

Variable Default value Description
nvidia_driver_package_state "present" Package state for NVIDIA driver packages
nvidia_driver_package_version "" Package version to install. Note that this should match the actual version of the deb or RPM package to be installed.
nvidia_driver_persistence_mode_on yes Whether to enable persistence mode (boolean)
nvidia_driver_skip_reboot no Whether to skip rebooting the node during the install
nvidia_driver_module_file "/etc/modprobe.d/nvidia.conf" Filename to use for NVIDIA driver parameters
nvidia_driver_module_params "" Parameters to pass to the NVIDIA driver
nvidia_driver_branch "515" Default driver branch to install

Red Hat specific variables

Variable Default value Description
epel_package "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" Package to install to enable EPEL
nvidia_driver_rhel_cuda_repo_baseurl "https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/" Base URL to use for CUDA repo
nvidia_driver_rhel_cuda_repo_gpgkey "https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/7fa2af80.pub" GPG key for the CUDA repo

Ubuntu specific variables

For Ubuntu installs, you have the choice of installing from the Canonical repositories and the NVIDIA CUDA repositories.

By default, the Canonical repositories will be used, and the driver installed will be the headless server driver.

Variable Default value Description
nvidia_driver_ubuntu_install_from_cuda_repo no Flag whether to use the CUDA repo
nvidia_driver_ubuntu_cuda_repo_baseurl "http://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}" Base URL to use for CUDA repo
nvidia_driver_ubuntu_cuda_package "cuda-drivers" Package name to install from CUDA repo
nvidia_driver_ubuntu_packages_suffix "-server" The suffix added to the apt packages when installing

Example playbook

- hosts: gpu_nodes
  roles:
  - nvidia.nvidia_driver

Supported distributions

Currently, this role supports the following Linux distributions:

  • NVIDIA DGX OS 4
  • NVIDIA DGX OS 5
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • CentOS 7
  • Red Hat Enterprise Linux 7
  • CentOS 8
  • Red Hat Enterprise Linux 8

ansible-role-nvidia-driver's People

Contributors

ajdecon avatar lukeyeager avatar dholt avatar nvhans avatar michael-balint avatar pescobar avatar supertetelman avatar clementgautier avatar ohsawa0515 avatar f4nha avatar phogan-nvidia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.