(nodeId: string, serverId?: string)
| 331 | }; |
| 332 | |
| 333 | const verifySetup = async (nodeId: string, serverId?: string) => { |
| 334 | const finalStatus = await checkGPUStatus(serverId); |
| 335 | |
| 336 | if (!finalStatus.swarmEnabled) { |
| 337 | const diagnosticCommands = [ |
| 338 | `docker node inspect ${nodeId}`, |
| 339 | 'nvidia-smi -a | grep "GPU UUID"', |
| 340 | "cat /etc/docker/daemon.json", |
| 341 | "cat /etc/nvidia-container-runtime/config.toml", |
| 342 | ].join(" && "); |
| 343 | |
| 344 | await (serverId |
| 345 | ? execAsyncRemote(serverId, diagnosticCommands) |
| 346 | : execAsync(diagnosticCommands)); |
| 347 | |
| 348 | throw new Error("GPU support not detected in swarm after setup"); |
| 349 | } |
| 350 | |
| 351 | return finalStatus; |
| 352 | }; |
no test coverage detected