Browse Source

提交代码

pull/2458/head
ychao_1983 2 years ago
parent
commit
e501169c78
2 changed files with 3 additions and 20 deletions
  1. +0
    -19
      modules/cloudbrain/cloudbrain.go
  2. +3
    -1
      routers/repo/cloudbrain.go

+ 0
- 19
modules/cloudbrain/cloudbrain.go View File

@@ -286,25 +286,6 @@ func GenerateTask(req GenerateCloudBrainTaskReq) error {
},
},
}
if len(req.CkptName) == 0 {
volumes = append(volumes, models.Volume{
HostPath: models.StHostPath{
Path: req.ModelPath,
MountPath: ModelMountPath,
ReadOnly: false,
},
})

} else {
volumes = append(volumes, models.Volume{
HostPath: models.StHostPath{
Path: req.ModelPath,
MountPath: ModelMountPath + "/" + req.CkptName,
ReadOnly: false,
},
})

}

if len(req.DatasetInfos) == 1 {
volumes = append(volumes, models.Volume{


+ 3
- 1
routers/repo/cloudbrain.go View File

@@ -429,7 +429,7 @@ func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBra
DatasetNames: datasetNames,
DatasetInfos: datasetInfos,
CodePath: storage.GetMinioPath(jobName, cloudbrain.CodeMountPath+"/"),
ModelPath: ckptUrl,
ModelPath: setting.Attachment.Minio.RealPath + setting.Attachment.Minio.Bucket + "/" + form.TrainUrl,
BenchmarkPath: storage.GetMinioPath(jobName, cloudbrain.BenchMarkMountPath+"/"),
Snn4ImageNetPath: storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"),
BrainScorePath: storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"),
@@ -2516,6 +2516,8 @@ func getInferenceJobCommand(form auth.CreateCloudBrainInferencForm) (string, err
}
}

param += " --modelname" + "=" + form.CkptName

command += "python /code/" + bootFile + param + " > " + cloudbrain.ResultPath + "/" + form.DisplayJobName + "-" + cloudbrain.LogFile

return command, nil


Loading…
Cancel
Save