#5143 所有卡支持再次调试时保存上次的代码目录

Merged
ychao_1983 merged 2 commits from fix-5099 into V20240129 4 months ago
  1. +25
    -1
      services/ai_task_service/task/grampus_notebook_task.go

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

@@ -75,7 +75,7 @@ func GetGrampusNoteBookConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseCon
}
}

if opts.ComputeSource == models.NPU || opts.ComputeSource == models.DCU {
if opts.ComputeSource == models.NPU {
config = &entity.AITaskBaseConfig{
ContainerSteps: map[entity.ContainerDataType]*entity.ContainerBuildOpts{
entity.ContainerCode: {
@@ -97,6 +97,29 @@ func GetGrampusNoteBookConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseCon
}
}

if opts.ComputeSource == models.DCU {
config = &entity.AITaskBaseConfig{
ContainerSteps: map[entity.ContainerDataType]*entity.ContainerBuildOpts{
entity.ContainerCode: {
ContainerPath: codePath,
ReadOnly: false,
AcceptStorageType: []entity.StorageType{entity.OBS},
VolumeFolder: true,
},
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.GCU {
config = &entity.AITaskBaseConfig{
ContainerSteps: map[entity.ContainerDataType]*entity.ContainerBuildOpts{
@@ -104,6 +127,7 @@ func GetGrampusNoteBookConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseCon
ContainerPath: "/tmp" + codePath,
ReadOnly: false,
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS},
VolumeFolder: true,
},
entity.ContainerDataset: {
ContainerPath: "/tmp" + datasetPath,


Loading…
Cancel
Save