#4609 修复超算

Merged
chenyifan01 merged 1 commits from fix-4304 into V20230808 9 months ago
  1. +22
    -1
      services/ai_task_service/task/grampus_notebook_task.go

+ 22
- 1
services/ai_task_service/task/grampus_notebook_task.go View File

@@ -39,7 +39,7 @@ func GetGrampusNoteBookConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseCon
ContainerPath: codePath,
ReadOnly: false,
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS},
VolumeFolder: true,
VolumeFolder: true,
},
entity.ContainerDataset: {
ContainerPath: datasetPath,
@@ -53,6 +53,27 @@ func GetGrampusNoteBookConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseCon
},
},
}
if opts.ComputeSource == models.CPU {
config = &entity.AITaskBaseConfig{
ContainerSteps: map[entity.ContainerDataType]*entity.ContainerBuildOpts{
entity.ContainerCode: {
ContainerPath: codePath,
ReadOnly: false,
AcceptStorageType: []entity.StorageType{entity.MINIO},
},
entity.ContainerDataset: {
ContainerPath: datasetPath,
ReadOnly: true,
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS},
},
entity.ContainerPreTrainModel: {
ContainerPath: pretrainModelPath,
ReadOnly: true,
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS},
},
},
}
}

if opts.ComputeSource == models.NPU || opts.ComputeSource == models.DCU {
config = &entity.AITaskBaseConfig{


Loading…
Cancel
Save