Skip to content

Commit

Permalink
Provision tr-ubuntu3 and remove tr-ubuntu1 (#2645)
Browse files Browse the repository at this point in the history
tr-ubuntu3 is another SLURM login node. It replaces tr-ubuntu1 and has
no GPUs. Using `ubuntu3` instead of `ubuntu2` because the disk layout
has changed. We removed the `microk8s` disk from this revision.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
ben-z and github-actions[bot] authored Apr 13, 2024
1 parent 0d1000b commit 2ea347a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions components/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const DEV_MACHINES = [
]

export function Hero() {
const vCPUs = DEV_MACHINES.reduce((acc, m) => acc + parseInt(m.cpu_info.logical_processors), 0)
const ramBytes = DEV_MACHINES.reduce((acc, m) => acc + parseInt(m.memory_info.memory_total_kibibytes) * 1024, 0)
const redundantStorageBytes = machineInfo.bare_metals.flatMap(m => m.hosted_storage.map(s => parseInt(s.size_bytes))).reduce((acc, size) => acc + size, 0)
const vCPUs = DEV_MACHINES.reduce((acc, m) => acc + parseInt(m.cpu_info.logical_processors || "0"), 0)
const ramBytes = DEV_MACHINES.reduce((acc, m) => acc + parseInt(m.memory_info.memory_total_kibibytes || "0") * 1024, 0)
const redundantStorageBytes = machineInfo.bare_metals.flatMap(m => m.hosted_storage.map(s => parseInt(s.size_bytes || "0"))).reduce((acc, size) => acc + size, 0)
const gpuCount = DEV_MACHINES.reduce((acc, m) => acc + m.gpus.length, 0)

return (
Expand Down
8 changes: 4 additions & 4 deletions components/machine-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ export function MachineCard({
}
</CardTitle>
<CardDescription>{
`${pluralizeWithCount(parseInt(machine.cpu_info['logical_processors']), "CPU")}`
+ `, ${bytesToSize(parseInt(machine.memory_info["memory_total_kibibytes"])*1024, 0)} RAM`
`${pluralizeWithCount(parseInt(machine.cpu_info['logical_processors'] || "0"), "CPU")}`
+ `, ${bytesToSize(parseInt(machine.memory_info["memory_total_kibibytes"] || "0")*1024, 0)} RAM`
+ ('gpus' in machine && machine.gpus?.length ? `, ${pluralizeWithCount(machine.gpus.length, "GPU")}` : "")
}</CardDescription>
</CardHeader>
Expand Down Expand Up @@ -211,7 +211,7 @@ export function MachineCard({
</div>
<div className="flex flex-col py-3 first:pt-0">
<dt className="mb-1 text-gray-500 dark:text-gray-400">RAM</dt>
<dd className="font-medium">{bytesToSize(parseInt(machine.memory_info["memory_total_kibibytes"])*1024, 0)}</dd>
<dd className="font-medium">{bytesToSize(parseInt(machine.memory_info["memory_total_kibibytes"] || "0")*1024, 0)}</dd>
</div>
{ 'gpus' in machine && machine.gpus.length ? (
<div className="flex flex-col py-3 first:pt-0">
Expand All @@ -237,7 +237,7 @@ export function MachineCard({
{machine.hosted_storage.length ? machine.hosted_storage.map((storage, index) => {
return (
<li key={index} className="my-0">
{storage['mountpoint']} ({bytesToSize(parseInt(storage['size_bytes']), 0)})
{storage['mountpoint']} ({bytesToSize(parseInt(storage['size_bytes'] || "0"), 0)})
</li>
)
}) : "None"}
Expand Down

0 comments on commit 2ea347a

Please sign in to comment.