|
|
@@ -28,11 +28,10 @@ const ( |
|
|
|
|
|
|
|
CodeArchiveName = "master.zip" |
|
|
|
|
|
|
|
BucketRemote = "grampus" |
|
|
|
RemoteModelPath = "/output/" + models.ModelSuffix |
|
|
|
autoStopDurationMs = 4 * 60 * 60 * 1000 |
|
|
|
CommandGpuDebug = "mkdir -p /dataset;%s! [ -x \"$(command -v jupyter)\" ] && pip install jupyterlab==3 -i https://pypi.tuna.tsinghua.edu.cn/simple;jupyter lab --ServerApp.shutdown_no_activity_timeout=%s --TerminalManager.cull_inactive_timeout=%s --TerminalManager.cull_interval=%s --MappingKernelManager.cull_idle_timeout=%s --MappingKernelManager.cull_interval=%s --MappingKernelManager.cull_connected=True --MappingKernelManager.cull_busy=True --no-browser --ip=0.0.0.0 --allow-root --notebook-dir='/code' --port=$OCTOPUS_NOTEBOOK_PORT --LabApp.token='' --LabApp.allow_origin='*' --LabApp.base_url=$OCTOPUS_NOTEBOOK_BASE_URL;" |
|
|
|
CommandGrampusDebug = "unzip -d %s %s;" + CommandGpuDebug |
|
|
|
BucketRemote = "grampus" |
|
|
|
RemoteModelPath = "/output/" + models.ModelSuffix |
|
|
|
autoStopDurationMs = 4 * 60 * 60 * 1000 |
|
|
|
CommandGpuDebug = "mkdir -p /dataset;%s! [ -x \"$(command -v jupyter)\" ] && pip install jupyterlab==3 -i https://pypi.tuna.tsinghua.edu.cn/simple;jupyter lab --ServerApp.shutdown_no_activity_timeout=%s --TerminalManager.cull_inactive_timeout=%s --TerminalManager.cull_interval=%s --MappingKernelManager.cull_idle_timeout=%s --MappingKernelManager.cull_interval=%s --MappingKernelManager.cull_connected=True --MappingKernelManager.cull_busy=True --no-browser --ip=0.0.0.0 --allow-root --notebook-dir='/code' --port=$OCTOPUS_NOTEBOOK_PORT --LabApp.token='' --LabApp.allow_origin='*' --LabApp.base_url=$OCTOPUS_NOTEBOOK_BASE_URL;" |
|
|
|
) |
|
|
|
|
|
|
|
var ( |
|
|
@@ -251,7 +250,7 @@ func GenerateNotebookJob(ctx *context.Context, req *GenerateNotebookJobReq) (job |
|
|
|
imageUrl = "" |
|
|
|
} |
|
|
|
codeArchiveContainerPath := cloudbrain.CodeMountPath + "/" + codeArchiveName |
|
|
|
req.Command = fmt.Sprintf(CommandGrampusDebug, cloudbrain.CodeMountPath, codeArchiveContainerPath, cpCommand, setting.CullIdleTimeout, setting.CullIdleTimeout, setting.CullInterval, setting.CullIdleTimeout, setting.CullInterval) |
|
|
|
req.Command = fmt.Sprintf(CommandGpuDebug, cloudbrain.CodeMountPath, codeArchiveContainerPath, cpCommand, setting.CullIdleTimeout, setting.CullIdleTimeout, setting.CullInterval, setting.CullIdleTimeout, setting.CullInterval) |
|
|
|
log.Info("debug command:" + req.Command) |
|
|
|
|
|
|
|
} |
|
|
|