Skip to content

Commit

Permalink
Enable NVIDIA Plugin automatically for AL2023 GPU AMIs (#8199)
Browse files Browse the repository at this point in the history
Signed-off-by: Davanum Srinivas <[email protected]>
  • Loading branch information
dims authored Feb 6, 2025
1 parent 731b521 commit 987f978
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/eks/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,19 +339,21 @@ func (c *ClusterProvider) ClusterTasksForNodeGroups(cfg *api.ClusterConfig, inst
for _, ng := range cfg.NodeGroups {
clusterRequiresNeuronDevicePlugin = clusterRequiresNeuronDevicePlugin ||
api.HasInstanceType(ng, instanceutils.IsNeuronInstanceType)
// Only AL2 requires the NVIDIA device plugin
// Only AL2/AL2023 requires the NVIDIA device plugin
clusterRequiresNvidiaDevicePlugin = clusterRequiresNvidiaDevicePlugin ||
(api.HasInstanceType(ng, instanceutils.IsNvidiaInstanceType) &&
ng.GetAMIFamily() == api.NodeImageFamilyAmazonLinux2)
ng.GetAMIFamily() == api.NodeImageFamilyAmazonLinux2 ||
ng.GetAMIFamily() == api.NodeImageFamilyAmazonLinux2023)
efaEnabled = efaEnabled || api.IsEnabled(ng.EFAEnabled)
}
for _, ng := range cfg.ManagedNodeGroups {
clusterRequiresNeuronDevicePlugin = clusterRequiresNeuronDevicePlugin ||
api.HasInstanceTypeManaged(ng, instanceutils.IsNeuronInstanceType)
// Only AL2 requires the NVIDIA device plugin
// Only AL2/AL2023 requires the NVIDIA device plugin
clusterRequiresNvidiaDevicePlugin = clusterRequiresNvidiaDevicePlugin ||
(api.HasInstanceTypeManaged(ng, instanceutils.IsNvidiaInstanceType) &&
ng.GetAMIFamily() == api.NodeImageFamilyAmazonLinux2)
ng.GetAMIFamily() == api.NodeImageFamilyAmazonLinux2 ||
ng.GetAMIFamily() == api.NodeImageFamilyAmazonLinux2023)
efaEnabled = efaEnabled || api.IsEnabled(ng.EFAEnabled)
}
if clusterRequiresNeuronDevicePlugin {
Expand Down

0 comments on commit 987f978

Please sign in to comment.