From 7fc2c3ec09209fa0854243e689f5e1774645ca86 Mon Sep 17 00:00:00 2001 From: Harry-zklcdc Date: Mon, 5 May 2025 21:26:47 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20=F0=9F=90=9B=20Send=20Instance=20Curren?= =?UTF-8?q?t=20Config=20to=20Controler=20#23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/instanceController/patchGpu.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/instanceController/patchGpu.go b/services/instanceController/patchGpu.go index ab71abf..672dc7d 100644 --- a/services/instanceController/patchGpu.go +++ b/services/instanceController/patchGpu.go @@ -45,6 +45,15 @@ func patchGpu(ip string, port int, apikey string, Dest: "/root/megrez-tmp", }, } + data.GpuPatch = &gpuPatchStruct{ + GpuCount: gpuCount, + } + data.CpuPatch = &cpuPatchStruct{ + CpuCount: cpuCountPerGpu * gpuCount, + } + data.MemoryPatch = &MemoryPatchStruct{ + Memory: strconv.Itoa(memoryPerGpu*gpuCount) + "GB", + } } reqBytes, err := json.Marshal(data)