diff --git a/models/cloudbrain.go b/models/cloudbrain.go index cdd04cc01..b3bfa1843 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -1060,7 +1060,7 @@ type UserImageConfig struct { CreateVersion bool `json:"create_version"` Flavor Flavor `json:"flavor"` PoolID string `json:"pool_id"` - DataMount Volumes `json:"volumes"` + Volumes Volumes `json:"volumes"` } type CreateTrainJobParams struct { @@ -1084,14 +1084,16 @@ type Config struct { CreateVersion bool `json:"create_version"` Flavor Flavor `json:"flavor"` PoolID string `json:"pool_id"` - DataMount Volumes `json:"volumes"` + Volumes Volumes `json:"volumes"` } + type CreateInferenceJobParams struct { JobName string `json:"job_name"` Description string `json:"job_desc"` InfConfig InfConfig `json:"config"` WorkspaceID string `json:"workspace_id"` } + type CreateInfUserImageParams struct { JobName string `json:"job_name"` Description string `json:"job_desc"` @@ -1209,14 +1211,14 @@ type DataSource struct { } type Volumes struct { - Nfs Nfs `json:"nfs"` + Nfs []Nfs `json:"nfs"` HostPath HostPath `json:"host_path"` } type Nfs struct { ID string `json:"id"` - SourcePath string `json:"nfs_server_path"` - DestPath string `json:"local_path"` + SourcePath string `json:"src_path"` + DestPath string `json:"dest_path"` ReadOnly bool `json:"read_only"` } diff --git a/modules/modelarts/modelarts.go b/modules/modelarts/modelarts.go index a223f8708..e2ad865bf 100755 --- a/modules/modelarts/modelarts.go +++ b/modules/modelarts/modelarts.go @@ -68,7 +68,7 @@ const ( TotalVersionCount = 1 VolumeSourcePath = "192.168.0.30:/" - VolumeDestPath = "/cache/data/" + VolumeDestPath = "/cache/sfs/" ) var ( @@ -376,11 +376,13 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str Parameter: req.Parameters, UserImageUrl: req.UserImageUrl, UserCommand: req.UserCommand, - DataMount: models.Volumes{ - Nfs: models.Nfs{ - SourcePath: VolumeSourcePath, - DestPath: VolumeDestPath, - ReadOnly: false, + Volumes: models.Volumes{ + Nfs: []models.Nfs{ + { + SourcePath: VolumeSourcePath, + DestPath: VolumeDestPath, + ReadOnly: false, + }, }, }, }, @@ -403,11 +405,13 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str Code: req.Spec.SourceSpecId, }, Parameter: req.Parameters, - DataMount: models.Volumes{ - Nfs: models.Nfs{ - SourcePath: VolumeSourcePath, - DestPath: VolumeDestPath, - ReadOnly: false, + Volumes: models.Volumes{ + Nfs: []models.Nfs{ + { + SourcePath: VolumeSourcePath, + DestPath: VolumeDestPath, + ReadOnly: false, + }, }, }, },