Skip to content

Commit

Permalink
Cherry pick nvidia (#7)
Browse files Browse the repository at this point in the history
* 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 <etienne.dubeau@calculquebec.ca>
Co-authored-by: Félix-Antoine Fortin <felix-antoine.fortin@calculquebec.ca>
Co-authored-by: poquirion <pierre-olivier.quirion@calculquebec.ca>
  • Loading branch information
4 people authored Sep 12, 2024
1 parent 73cd80a commit 932fb97
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions site/profile/manifests/gpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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,
Expand All @@ -106,6 +117,7 @@
package { $packages:
ensure => 'installed',
require => [
Package['nvidia-stream'],
Package['kernel-devel'],
Exec['cuda-repo'],
Yumrepo['epel'],
Expand Down
2 changes: 1 addition & 1 deletion site/profile/manifests/squid.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down

0 comments on commit 932fb97

Please sign in to comment.