From 49a6b72c600a3daf2347833fcb2b708b7a1fa1cf Mon Sep 17 00:00:00 2001 From: vishalkadam47 Date: Thu, 2 Jan 2025 21:01:03 +0530 Subject: [PATCH] refactor: remove unnecessary error logging in GPU setup functions --- packages/server/src/utils/gpu-setup.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/server/src/utils/gpu-setup.ts b/packages/server/src/utils/gpu-setup.ts index 0b49dc6c..6a6611b4 100644 --- a/packages/server/src/utils/gpu-setup.ts +++ b/packages/server/src/utils/gpu-setup.ts @@ -35,7 +35,6 @@ export async function checkGPUStatus(serverId?: string): Promise { ...cudaInfo, }; } catch (error) { - console.error("Error in checkGPUStatus:", error); return { driverInstalled: false, driverVersion: undefined, @@ -317,7 +316,6 @@ const setupLocalServer = async (daemonConfig: any) => { try { await execAsync(setupCommands); } catch (error) { - console.error("Setup failed:", error); throw new Error( "Failed to configure GPU support. Please ensure you have sudo privileges and try again.", ); @@ -344,11 +342,10 @@ const verifySetup = async (nodeId: string, serverId?: string) => { "cat /etc/nvidia-container-runtime/config.toml", ].join(" && "); - const { stdout: diagnostics } = serverId - ? await execAsyncRemote(serverId, diagnosticCommands) - : await execAsync(diagnosticCommands); + await (serverId + ? execAsyncRemote(serverId, diagnosticCommands) + : execAsync(diagnosticCommands)); - console.error("Diagnostic Information:", diagnostics); throw new Error("GPU support not detected in swarm after setup"); }