From 932fb97c96d181546d2485987d114627b71b5ddb Mon Sep 17 00:00:00 2001 From: P-O Quirion Date: Wed, 11 Sep 2024 23:21:48 -0400 Subject: [PATCH] Cherry pick nvidia (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Set Nvidia driver stream to proprietary version * Switch to version 555 * Set Nvidia driver stream to proprietary version * squid cache at localscratch root --------- Co-authored-by: Etienne Co-authored-by: FĂ©lix-Antoine Fortin Co-authored-by: poquirion --- data/common.yaml | 9 +++++++++ site/profile/manifests/gpu.pp | 12 ++++++++++++ site/profile/manifests/squid.pp | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/data/common.yaml b/data/common.yaml index 2728cc80a..0689ff288 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -290,3 +290,12 @@ profile::reverse_proxy::subdomains: profile::jupyterhub::hub::register_url: "https://mokey.%{lookup('terraform.data.domain_name')}/auth/signup" profile::jupyterhub::hub::reset_pw_url: "https://mokey.%{lookup('terraform.data.domain_name')}/auth/forgotpw" +profile::gpu::install::passthrough::packages: + - nvidia-driver-cuda-libs + - nvidia-driver + - nvidia-driver-devel + - nvidia-driver-libs + - nvidia-driver-NVML + - nvidia-modprobe + - nvidia-xconfig + - nvidia-persistenced diff --git a/site/profile/manifests/gpu.pp b/site/profile/manifests/gpu.pp index 527367f18..5d9dcf9a2 100644 --- a/site/profile/manifests/gpu.pp +++ b/site/profile/manifests/gpu.pp @@ -82,6 +82,7 @@ class profile::gpu::install::passthrough ( Array[String] $packages, + String $nvidia_driver_stream = '555-dkms' ) { $os = "rhel${::facts['os']['release']['major']}" $arch = $::facts['os']['architecture'] @@ -97,6 +98,16 @@ path => ['/usr/bin'], } + package { 'nvidia-stream': + ensure => present, + name => "nvidia-driver:${nvidia_driver_stream}", + provider => dnfmodule, + enable_only => true, + require => [ + Exec['cuda-repo'], + ] + } + $mig_profile = lookup("terraform.instances.${facts['networking']['hostname']}.specs.mig", Variant[Undef, Hash[String, Integer]], undef, {}) class { 'profile::gpu::config::mig': mig_profile => $mig_profile, @@ -106,6 +117,7 @@ package { $packages: ensure => 'installed', require => [ + Package['nvidia-stream'], Package['kernel-devel'], Exec['cuda-repo'], Yumrepo['epel'], diff --git a/site/profile/manifests/squid.pp b/site/profile/manifests/squid.pp index 780f0b4f4..8311681b0 100644 --- a/site/profile/manifests/squid.pp +++ b/site/profile/manifests/squid.pp @@ -52,7 +52,7 @@ squid::http_access { 'CLUSTER_NETWORK CVMFS': action => 'allow', } - squid::cache_dir { '/localscratch/var/spool/squid': + squid::cache_dir { '/localscratch/squid': type => 'ufs', options => "${cache_size} 16 256", }