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

Function getNodeId

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

Source from the content-addressed store, hash-verified

258};
259
260const getNodeId = async (serverId?: string) => {
261 const nodeIdCommand = 'docker info --format "{{.Swarm.NodeID}}"';
262 const { stdout: nodeId } = serverId
263 ? await execAsyncRemote(serverId, nodeIdCommand)
264 : await execAsync(nodeIdCommand);
265
266 const trimmedNodeId = nodeId.trim();
267 if (!trimmedNodeId) {
268 throw new Error("Setup Server before enabling GPU support");
269 }
270
271 return trimmedNodeId;
272};
273
274const createDaemonConfig = (availableGPUs: number) => ({
275 runtimes: {

Callers 1

setupGPUSupportFunction · 0.85

Calls 2

execAsyncRemoteFunction · 0.90
execAsyncFunction · 0.90

Tested by

no test coverage detected