forked from Azure/AgentBaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscenario_ubuntu2204-gpu-nodriver.go
37 lines (35 loc) · 1.41 KB
/
scenario_ubuntu2204-gpu-nodriver.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package scenario
import (
"github.com/Azure/agentbaker/pkg/agent/datamodel"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)
func (t *Template) ubuntu2204gpuNoDriver() *Scenario {
return &Scenario{
Name: "ubuntu2204-gpu-nodriver",
Description: "Tests that a GPU-enabled node using the Ubuntu 2204 VHD opting for skipping gpu driver installation can be properly bootstrapped",
Config: Config{
ClusterSelector: NetworkPluginKubenetSelector,
ClusterMutator: NetworkPluginKubenetMutator,
VHDSelector: t.Ubuntu2204Gen2Containerd,
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-ubuntu-containerd-22.04-gen2"
nbc.AgentPoolProfile.Distro = "aks-ubuntu-containerd-22.04-gen2"
nbc.AgentPoolProfile.VMSize = "Standard_NC6s_v3"
nbc.ConfigGPUDriverIfNeeded = true
nbc.EnableGPUDevicePluginIfNeeded = false
nbc.EnableNvidia = true
},
VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) {
vmss.Tags = map[string]*string{
// deliberately case mismatched to agentbaker logic to check case insensitivity
"SkipGPUDriverInstall": to.Ptr("true"),
}
vmss.SKU.Name = to.Ptr("Standard_NC6s_v3")
},
LiveVMValidators: []*LiveVMValidator{
NvidiaSMINotInstalledValidator(),
},
},
}
}