From 59bfbd2ac1c45f77b8b97dccde5dc0fb0b3916e6 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 5 Nov 2021 10:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index ad06dc031..b85e3ba64 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -161,9 +161,10 @@ func downloadModelFromCloudBrainTwo(modelUUID string, jobName string, parentDir if len(modelDbResult) == 0 { return "", 0, errors.New("cannot create model, as model is empty.") } - prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath, parentDir), "/") + "/" + prefix := "/" + strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath, parentDir), "/") + "/" for _, modelFile := range modelDbResult { - destKeyNamePrefix := "aimodels/" + models.AttachmentRelativePath(modelUUID) + "/" + destKeyNamePrefix := "/aimodels/" + models.AttachmentRelativePath(modelUUID) + "/" + log.Info("copy file, bucket=" + setting.Bucket + ", src keyname=" + prefix + modelFile.FileName) log.Info("Dest key name=" + destKeyNamePrefix + modelFile.FileName) err := storage.ObsCopyFile(setting.Bucket, prefix+modelFile.FileName, setting.Bucket, destKeyNamePrefix+modelFile.FileName)