Forge Home

nvidia

Manages NVIDIA proprietary drivers

3,746 downloads

232 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.6.2 (latest)
  • 0.6.1
  • 0.6.0
  • 0.5.14
  • 0.5.13
  • 0.5.12
  • 0.5.11
  • 0.5.10
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
released Dec 21st 2022
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'monkygames-nvidia', '0.6.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add monkygames-nvidia
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install monkygames-nvidia --version 0.6.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

monkygames/nvidia — version 0.6.2 Dec 21st 2022

NVIDIA

Description

Installs the proprietary NVIDIA drivers using the default-graphics PPA. Also can install CUDA if requested.

Cuda Additional Setup

If CUDA was installed, users of CUDA will need to setup their .bashrc file. The following needs to be added to the user's .bashrc file assuming CUDA 11-1 was installed.

# set PATH for cuda 11.1 installation
if [ -d "/usr/local/cuda-11.1/bin/" ]; then
    export PATH=/usr/local/cuda-11.1/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

I recommend using the puppetlabs-account module for managing this. Your puppet code can manage /etc/bashrc.puppet with the above (using variables for the cuda-version).

Test the cuda setup with the following command:

nvcc  --version

xorg configuration

This module can manage the xorg configuration file. The configuration will automatically detect all NVIDIA graphics cards and will add them to the xorg configuration as virtual monitors (headless mode). This also enables overclocking settings that can be configured either via command line or through the nvidia settings.

This is very useful for GPUs running in headless mode.

Use the following code to enable xconfig management.

contain nvidia::xconfig

Overclocking

This module provides a script and service for overclocking NVIDIA GPUs. The nvidia::overclock class sets the following GPU settings for defaults:

  • Power Limit
  • Core Clock
  • Memory Frequency
  • Fan Speed

GPU Profiles have been added to configure cards based on their product name. To specify a profile, create a hash with an integer id and the product name that is returned by nvidia-smi. To find the product name, nvidia settings GUI can be used, just look at the GPU and the 'Graphics Processor'.

Or from the command line:

nvidia-smi -i [CARD_ID] -q | grep 'Product Name'

The hash format is as below

   'id'              :
       'card_name'   :
       'gpu_freq'    :
       'vram_freq'   :
       'power_limit' :

To have multiple GPU profiles, create new hash entries incrementing the id each time.

API

See REFERENCE.md

Tips