Browse Source

Merge branch 'fix-1067' of https://git.openi.org.cn/OpenI/aiforge into fix-1067

pull/1166/head
zhoupzh 3 years ago
parent
commit
5d889658a7
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      modules/cloudbrain/cloudbrain.go
  2. +3
    -2
      routers/repo/cloudbrain.go
  3. +0
    -1
      routers/repo/modelarts.go

+ 1
- 1
modules/cloudbrain/cloudbrain.go View File

@@ -268,7 +268,7 @@ func RestartTask(ctx *context.Context, task *models.Cloudbrain) error {
Volumes: []models.Volume{
{
HostPath: models.StHostPath{
Path: setting.JobPath + jobName + CodeMountPath,
Path: storage.GetMinioPath(jobName, CodeMountPath + "/"),
MountPath: CodeMountPath,
ReadOnly: false,
},


+ 3
- 2
routers/repo/cloudbrain.go View File

@@ -206,7 +206,7 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {
}
repo := ctx.Repo.Repository
downloadCode(repo, codePath)
uploadCodeToMinio(codePath+"/", jobName, "/code/")
uploadCodeToMinio(codePath+"/", jobName, cloudbrain.CodeMountPath+"/")

modelPath := setting.JobPath + jobName + cloudbrain.ModelMountPath + "/"
mkModelPath(modelPath)
@@ -236,7 +236,8 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {
uploadCodeToMinio(brainScorePath+"/", jobName, cloudbrain.BrainScoreMountPath+"/")
}

err = cloudbrain.GenerateTask(ctx, jobName, image, command, uuid, codePath, storage.GetMinioPath(jobName, cloudbrain.ModelMountPath+"/"),
err = cloudbrain.GenerateTask(ctx, jobName, image, command, uuid, storage.GetMinioPath(jobName, cloudbrain.CodeMountPath+"/"),
storage.GetMinioPath(jobName, cloudbrain.ModelMountPath+"/"),
storage.GetMinioPath(jobName, cloudbrain.BenchMarkMountPath+"/"), storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"),
storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), jobType, gpuQueue, resourceSpecId)
if err != nil {


+ 0
- 1
routers/repo/modelarts.go View File

@@ -303,7 +303,6 @@ func NotebookManage(ctx *context.Context) {
}
}


ctx.JSON(200, map[string]string{
"result_code": resultCode,
"error_msg": errorMsg,


Loading…
Cancel
Save