MCPcopy
hub / github.com/Dokploy/dokploy / checkGPUStatus

Function checkGPUStatus

packages/server/src/utils/gpu-setup.ts:18–51  ·  view source on GitHub ↗
(serverId?: string)

Source from the content-addressed store, hash-verified

16}
17
18export async function checkGPUStatus(serverId?: string): Promise<GPUInfo> {
19 try {
20 const [driverInfo, runtimeInfo, swarmInfo, gpuInfo, cudaInfo] =
21 await Promise.all([
22 checkGpuDriver(serverId),
23 checkRuntime(serverId),
24 checkSwarmResources(serverId),
25 checkGpuInfo(serverId),
26 checkCudaSupport(serverId),
27 ]);
28
29 return {
30 ...driverInfo,
31 ...runtimeInfo,
32 ...swarmInfo,
33 ...gpuInfo,
34 ...cudaInfo,
35 };
36 } catch {
37 return {
38 driverInstalled: false,
39 driverVersion: undefined,
40 runtimeInstalled: false,
41 runtimeConfigured: false,
42 cudaSupport: false,
43 cudaVersion: undefined,
44 gpuModel: undefined,
45 memoryInfo: undefined,
46 availableGPUs: 0,
47 swarmEnabled: false,
48 gpuResources: 0,
49 };
50 }
51}
52
53const checkGpuDriver = async (serverId?: string) => {
54 let driverVersion: string | undefined;

Callers 3

settings.tsFile · 0.90
setupGPUSupportFunction · 0.85
verifySetupFunction · 0.85

Calls 5

checkGpuDriverFunction · 0.85
checkRuntimeFunction · 0.85
checkSwarmResourcesFunction · 0.85
checkGpuInfoFunction · 0.85
checkCudaSupportFunction · 0.85

Tested by

no test coverage detected