diff --git a/modules/cloudbrain/cloudbrain.go b/modules/cloudbrain/cloudbrain.go index 3805f253f..2ce2cf885 100755 --- a/modules/cloudbrain/cloudbrain.go +++ b/modules/cloudbrain/cloudbrain.go @@ -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{ diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index d7796c0ba..335befcfa 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -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