Browse Source

提交代码

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 3 years ago
parent
commit
59bfbd2ac1
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      routers/repo/ai_model_manage.go

+ 3
- 2
routers/repo/ai_model_manage.go View File

@@ -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)


Loading…
Cancel
Save