CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/compute/cloud/google-cloud/accelerator.tsx
Views: 687
1
export function displayAcceleratorType(acceleratorType, memory?) {
2
let x = acceleratorType
3
.replace("tesla-", "")
4
.replace("nvidia-", "NVIDIA ")
5
.replace("-", " - ")
6
.toUpperCase();
7
if (x.includes("GB") || !memory) {
8
return x;
9
}
10
return `${x} - ${memory} GB`;
11
}
12
13