From 752efc0f7f1f112c0177fc8f976cbdc42aee59fe Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Mon, 12 Dec 2022 14:37:16 +0800 Subject: [PATCH] #3277 gcu:fix bug --- modules/grampus/grampus.go | 2 +- routers/repo/grampus.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/grampus/grampus.go b/modules/grampus/grampus.go index 2c28bda24..bc9a35861 100755 --- a/modules/grampus/grampus.go +++ b/modules/grampus/grampus.go @@ -156,7 +156,7 @@ func GenerateNotebookJob(ctx *context.Context, req *GenerateNotebookJobReq) (job var codeGrampus models.GrampusDataset var cpCommand string imageUrl := req.ImageUrl - if ProcessorTypeNPU == req.ProcessType || ProcessorTypeGCU == req.ProcessType { + if ProcessorTypeNPU == req.ProcessType { datasetGrampus = getDatasetGrampus(req.DatasetInfos) if len(req.ModelName) != 0 { datasetGrampus = append(datasetGrampus, models.GrampusDataset{ diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index 643886a8e..783d5d915 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -228,7 +228,7 @@ func GrampusNotebookCreate(ctx *context.Context, form auth.CreateGrampusNotebook return } - if processType == grampus.ProcessorTypeGPU { + if processType == grampus.ProcessorTypeGPU || processType == grampus.ProcessorTypeGCU { if err := uploadCodeToMinio(codeLocalPath+"/", jobName, cloudbrain.CodeMountPath+"/"); err != nil { log.Error("Failed to uploadCodeToMinio: %s (%v)", repo.FullName(), err, ctx.Data["MsgID"]) grampusNotebookNewDataPrepare(ctx, processType)