Skip to content

Commit

Permalink
Add support for GRID drivers in Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Jan 10, 2025
1 parent d4307c6 commit 40c8bc1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions data/cloud/azure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
profile::gpu::install::vgpu::installer: bin
profile::gpu::install::vgpu::bin::source: https://go.microsoft.com/fwlink/?linkid=874272
profile::gpu::install::vgpu::bin::gridd_content: |
IgnoreSP=FALSE
EnableUI=FALSE
4 changes: 3 additions & 1 deletion hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ hierarchy:
hostname: "%{facts.networking.hostname}"
- name: "Software stack"
path: "software_stack/%{facts.software_stack}.yaml"
- name: "Cloud provider"
- name: "Cloud provider region"
path: "cloud/%{facts.cloud.provider}/%{facts.cloud.region}.yaml"
- name: "Cloud provider"
path: "cloud/%{facts.cloud.provider}.yaml"
- name: "OS version"
path: "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
- name: "Other YAML hierarchy levels"
Expand Down
13 changes: 11 additions & 2 deletions site/profile/manifests/gpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@

class profile::gpu::install::vgpu::bin (
String $source,
String $gridd_source,
String $gridd_content = undef,
String $gridd_source = undef,
) {
exec { 'vgpu-driver-install-bin':
command => "curl -L ${source} -o /tmp/NVIDIA-driver.run && sh /tmp/NVIDIA-driver.run --ui=none --no-questions --disable-nouveau && rm /tmp/NVIDIA-driver.run", # lint:ignore:140chars
Expand All @@ -290,11 +291,19 @@
],
}

if $gridd_content {
$gridd_definition = { 'content' => $gridd_content }
} elsif $gridd_source {
$gridd_definition = { 'source' => $gridd_source }
} else {
$gridd_definition = {}
}

file { '/etc/nvidia/gridd.conf':
ensure => file,
mode => '0644',
owner => 'root',
group => 'root',
source => $gridd_source,
* => $gridd_definition,
}
}

0 comments on commit 40c8bc1

Please sign in to comment.