Browse Source

提交代码

tags/v1.22.7.1
ychao_1983 3 years ago
parent
commit
77fa16eb2f
1 changed files with 20 additions and 7 deletions
  1. +20
    -7
      modules/cloudbrain/cloudbrain.go

+ 20
- 7
modules/cloudbrain/cloudbrain.go View File

@@ -256,13 +256,7 @@ func GenerateTask(req GenerateCloudBrainTaskReq) error {
ReadOnly: false,
},
},
{
HostPath: models.StHostPath{
Path: req.ModelPath,
MountPath: ModelMountPath,
ReadOnly: false,
},
},

{
HostPath: models.StHostPath{
Path: req.BenchmarkPath,
@@ -292,6 +286,25 @@ 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{


Loading…
Cancel
Save