diff --git a/api/cloud.go b/api/cloud.go index e73b2b7..7341a4b 100644 --- a/api/cloud.go +++ b/api/cloud.go @@ -28,6 +28,7 @@ func GetCloud(in *GetCloudInput) (gpuTypes []interface{}, err error) { minMemory minVcpu } + memoryInGb } } `, diff --git a/cmd/cloud/getCloud.go b/cmd/cloud/getCloud.go index 831c9c4..e6a0506 100644 --- a/cmd/cloud/getCloud.go +++ b/cmd/cloud/getCloud.go @@ -69,8 +69,15 @@ var GetCloudCmd = &cobra.Command{ if ok && spotPrice > 0 { onDemandPriceString = fmt.Sprintf("%.3f", onDemandPrice) } + vRAM, ok := gpuType["memoryInGb"].(float64) + vRAMString := "" + if ok { + vRAMString = fmt.Sprintf("%.0f", vRAM) + } + row := []string{ fmt.Sprintf("%dx %s", gpuCount, kv["gpuTypeId"].(string)), + vRAMString, fmt.Sprintf("%.f", kv["minMemory"]), fmt.Sprintf("%.f", kv["minVcpu"]), spotPriceString, @@ -79,7 +86,7 @@ var GetCloudCmd = &cobra.Command{ data = append(data, row) } - header := []string{"GPU Type", "Mem GB", "vCPU", "Spot $/HR", "OnDemand $/HR"} + header := []string{"GPU Type", "VRAM GB", "Mem GB", "vCPU", "Spot $/HR", "OnDemand $/HR"} tb := tablewriter.NewWriter(os.Stdout) tb.SetHeader(header) tb.AppendBulk(data)