|
|
|
@@ -213,7 +213,7 @@ func downloadModelFromCloudBrainTwo(modelUUID string, jobName string, parentDir |
|
|
|
Files = append(Files, prefix+shortFile) |
|
|
|
} |
|
|
|
totalSize := storage.ObsGetFilesSize(setting.Bucket, Files) |
|
|
|
if totalSize > setting.MaxModelSize*MODEL_MAX_SIZE { |
|
|
|
if float64(totalSize) > setting.MaxModelSize*MODEL_MAX_SIZE { |
|
|
|
return "", 0, errors.New("Cannot create model, as model is exceed " + fmt.Sprint(setting.MaxModelSize) + "G.") |
|
|
|
} |
|
|
|
|
|
|
|
@@ -247,7 +247,7 @@ func downloadModelFromCloudBrainOne(modelUUID string, jobName string, parentDir |
|
|
|
Files = append(Files, modelSrcPrefix+shortFile) |
|
|
|
} |
|
|
|
totalSize := storage.MinioGetFilesSize(bucketName, Files) |
|
|
|
if totalSize > setting.MaxModelSize*MODEL_MAX_SIZE { |
|
|
|
if float64(totalSize) > setting.MaxModelSize*MODEL_MAX_SIZE { |
|
|
|
return "", 0, errors.New("Cannot create model, as model is exceed " + fmt.Sprint(setting.MaxModelSize) + "G.") |
|
|
|
} |
|
|
|
size, err := storage.MinioCopyFiles(bucketName, modelSrcPrefix, destKeyNamePrefix, filterFiles) |
|
|
|
|