Skip to content

Commit

Permalink
Add explicit requirement on dkms and kernel-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Feb 12, 2021
1 parent 58c13d3 commit 0eb1d68
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions site/profile/manifests/gpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@
}
}

class profile::gpu::install::deps {
class profile::gpu::install {
ensure_resource('file', '/etc/nvidia', {'ensure' => 'directory' })
ensure_packages(['kernel-devel'], {ensure => 'installed'})
ensure_packages(['dkms'], {
'require' => Yumrepo['epel']
})
}

class profile::gpu::install {

if ! $facts['nvidia_grid_vgpu'] {
require profile::gpu::install::passthrough
Expand Down Expand Up @@ -83,7 +80,6 @@
}

class profile::gpu::install::passthrough(Array[String] $packages) {
require profile::gpu::install::deps

$cuda_ver = $::facts['nvidia_cuda_version']
$os = "rhel${::facts['os']['release']['major']}"
Expand Down Expand Up @@ -122,8 +118,6 @@
Enum['rpm', 'bin', 'none'] $installer = 'none',
)
{
require profile::gpu::install::deps

if $installer == 'rpm' {
include profile::gpu::install::vgpu::rpm
} elsif $installer == 'bin' {
Expand Down Expand Up @@ -178,6 +172,10 @@
'/usr/bin/nvidia-modprobe',
],
timeout => 300,
require => [
Package['kernel-devel'],
Package['dkms'],
]
}

file { '/etc/nvidia/gridd.conf':
Expand Down

0 comments on commit 0eb1d68

Please sign in to comment.