From 7a084cf46741da013e9fc70024329ccef704234a Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 7 Aug 2023 15:52:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B6=85=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/grampus_notebook_task.go | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/services/ai_task_service/task/grampus_notebook_task.go b/services/ai_task_service/task/grampus_notebook_task.go index b5fcc3abbf..35e2f29258 100644 --- a/services/ai_task_service/task/grampus_notebook_task.go +++ b/services/ai_task_service/task/grampus_notebook_task.go @@ -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{ -- 2.34.1