|
|
@@ -28,7 +28,7 @@ const ( |
|
|
|
//notebook |
|
|
|
storageTypeOBS = "obs" |
|
|
|
autoStopDuration = 4 * 60 * 60 |
|
|
|
autoStopDurationMs = 4 * 60 * 60 * 1000 |
|
|
|
AutoStopDurationMs = 4 * 60 * 60 * 1000 |
|
|
|
MORDELART_USER_IMAGE_ENGINE_ID = -1 |
|
|
|
DataSetMountPath = "/home/ma-user/work" |
|
|
|
NotebookEnv = "Python3" |
|
|
@@ -281,7 +281,7 @@ func GenerateTask(ctx *context.Context, jobName, uuid, description, flavor strin |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, description, imageId string, spec *models.Specification, bootFile string) (string, error) { |
|
|
|
func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, description, imageId string, spec *models.Specification, bootFile string,autoStopDurationInMs int64) (string, error) { |
|
|
|
if poolInfos == nil { |
|
|
|
json.Unmarshal([]byte(setting.PoolInfos), &poolInfos) |
|
|
|
} |
|
|
@@ -296,7 +296,7 @@ func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, desc |
|
|
|
JobName: jobName, |
|
|
|
Description: description, |
|
|
|
Flavor: spec.SourceSpecId, |
|
|
|
Duration: autoStopDurationMs, |
|
|
|
Duration: autoStopDurationInMs, |
|
|
|
ImageID: imageId, |
|
|
|
PoolID: poolInfos.PoolInfo[0].PoolId, |
|
|
|
Feature: models.NotebookFeature, |
|
|
|