Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
grac3gao committed Oct 6, 2022
1 parent 0816c24 commit 145ec76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/utils/node_config.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func expandNodeConfig(v interface{}) *container.NodeConfig {
GpuPartitionSize: data["gpu_partition_size"].(string),
}

if v, ok := data["gpu_sharing_config"]; ok & len(v.([]interface{})) > 0 {
if v, ok := data["gpu_sharing_config"]; ok && len(v.([]interface{})) > 0 {
gpuSharingConfig := data["gpu_sharing_config"].([]interface{})[0].(map[string]interface{})
guestAcceleratorConfig.GpuSharingConfig = &container.GPUSharingConfig{
GpuSharingStrategy: gpuSharingConfig["gpu_sharing_strategy"].(string),
Expand Down

0 comments on commit 145ec76

Please sign in to comment.