Skip to content

Commit

Permalink
Move grid vgpu type definition in hieradata
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Jan 17, 2025
1 parent 56d86e6 commit 95a1e1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions data/cloud/azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ profile::gpu::install::vgpu::bin::source: https://go.microsoft.com/fwlink/?linki
profile::gpu::install::vgpu::bin::gridd_content: |
IgnoreSP=FALSE
EnableUI=FALSE
profile::gpu::install::vgpu::grid_vgpu_types:
- "^Standard_NV(6|12|18|36|72)ad[m]*s_A10_v5$"
- "^Standard_NV(12|24|48)s_v3$"
- "^Standard_NC(4|8|16|64)as_T4_v3$"
11 changes: 3 additions & 8 deletions site/profile/functions/is_grid_vgpu.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
function profile::is_grid_vgpu() >> Bool {
if $facts['nvidia_grid_vgpu'] {
true
} elsif $facts['cloud']['provider'] == 'azure' {
$type = lookup('terraform.self.specs.type')
(
$type =~ /^Standard_NV[a-z0-9]*_A10_v5$/ or
$type =~ /^Standard_NV(12|24|48)s_v3$/ or
$type =~ /^Standard_NC(4|8|16|64)as_T4_v3$/
)
} else {
false
$grid_vgpu_types = lookup('profile::gpu::install::vgpu::grid_vgpu_types', undef, undef, [])
$type = lookup('terraform.self.specs.type')
$grid_vgpu_types.any|$regex| { $type =~ Regexp($regex) }
}
}
1 change: 1 addition & 0 deletions site/profile/manifests/gpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
class profile::gpu::install::vgpu (
Enum['rpm', 'bin', 'none'] $installer = 'none',
String $nvidia_ml_py_version = '11.515.75',
Array[String] $grid_vgpu_types = [],
) {
if $installer == 'rpm' {
include profile::gpu::install::vgpu::rpm
Expand Down

0 comments on commit 95a1e1e

Please sign in to comment.