MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / loadGpus

Function loadGpus

vmm/ui/src/composables/useVmManager.ts:608–623  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

606 }
607
608 async function loadGpus() {
609 try {
610 const data = await vmmRpc.listGpus({});
611 const gpus = data.gpus || [];
612 availableGpus.value = gpus;
613 availableGpuProducts.value = [];
614 allowAttachAllGpus.value = data.allow_attach_all;
615 for (const gpu of gpus) {
616 if (!availableGpuProducts.value.find((product) => product.product_id === gpu.product_id)) {
617 availableGpuProducts.value.push(gpu);
618 }
619 }
620 } catch (error) {
621 recordError('error loading GPUs', error);
622 }
623 }
624
625 async function loadVersion() {
626 const data = await vmmRpc.version({});

Callers 2

showDeployDialogFunction · 0.85
useVmManagerFunction · 0.85

Calls 1

recordErrorFunction · 0.85

Tested by

no test coverage detected