diff --git a/modules/modelarts/modelarts.go b/modules/modelarts/modelarts.go index 03378159a..db31d45ec 100755 --- a/modules/modelarts/modelarts.go +++ b/modules/modelarts/modelarts.go @@ -67,9 +67,11 @@ const ( ConfigTypeCustom = "custom" TotalVersionCount = 1 - VolumeID = "c6a73891-6a19-4a6a-a2e8-0d6baa72a7c5" - VolumeSourcePath = "192.168.0.30:/" - VolumeDestPath = "/cache/sfs" + NfsID = "c6a73891-6a19-4a6a-a2e8-0d6baa72a7c5" + NfsSourcePath = "192.168.0.30:/" + NfsDestPath = "/cache/sfs" + HostSourcePath = "/mnt/sfs_turbo/data" + HostDestPath = "/cache/host" ) var ( @@ -380,9 +382,16 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str Volumes: []models.Volumes{ { Nfs: models.Nfs{ - ID: VolumeID, - SourcePath: VolumeSourcePath, - DestPath: VolumeDestPath, + ID: NfsID, + SourcePath: NfsSourcePath, + DestPath: NfsDestPath, + ReadOnly: false, + }, + }, + { + HostPath: models.HostPath{ + SourcePath: HostSourcePath, + DestPath: HostDestPath, ReadOnly: false, }, }, @@ -410,9 +419,16 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str Volumes: []models.Volumes{ { Nfs: models.Nfs{ - ID: VolumeID, - SourcePath: VolumeSourcePath, - DestPath: VolumeDestPath, + ID: NfsID, + SourcePath: NfsSourcePath, + DestPath: NfsDestPath, + ReadOnly: false, + }, + }, + { + HostPath: models.HostPath{ + SourcePath: HostSourcePath, + DestPath: HostDestPath, ReadOnly: false, }, }, diff --git a/modules/modelarts/resty.go b/modules/modelarts/resty.go index 058641ddd..b05bb0f9b 100755 --- a/modules/modelarts/resty.go +++ b/modules/modelarts/resty.go @@ -546,6 +546,8 @@ func createTrainJob(createJobParams models.CreateTrainJobParams) (*models.Create retry := 0 + log.Info("postapi detail", createJobParams.Config.Volumes) + sendjob: res, err := client.R(). SetHeader("Content-Type", "application/json").