Browse Source

#3277

gcu:code unzip
tags/v1.22.12.2^2
chenyifan01 3 years ago
parent
commit
df23f3e3f7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/grampus/grampus.go

+ 2
- 2
modules/grampus/grampus.go View File

@@ -31,7 +31,7 @@ const (
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 = CommandGpuDebug + "unzip %s;rm %s;"
CommandGrampusDebug = "FILE=%s\nif test -f \"$FILE\"; then\n unzip FILE\n rm FILE\nfi\n " + CommandGpuDebug
)

var (
@@ -202,7 +202,7 @@ func GenerateNotebookJob(ctx *context.Context, req *GenerateNotebookJobReq) (job
if ProcessorTypeGCU == req.ProcessType {
imageUrl = ""
}
req.Command = fmt.Sprintf(CommandGrampusDebug, cpCommand, setting.CullIdleTimeout, setting.CullIdleTimeout, setting.CullInterval, setting.CullIdleTimeout, setting.CullInterval, cloudbrain.CodeMountPath+"/"+codeArchiveName, cloudbrain.CodeMountPath+"/"+codeArchiveName)
req.Command = fmt.Sprintf(CommandGrampusDebug, cloudbrain.CodeMountPath+"/"+codeArchiveName, cpCommand, setting.CullIdleTimeout, setting.CullIdleTimeout, setting.CullInterval, setting.CullIdleTimeout, setting.CullInterval)
log.Info("debug command:" + req.Command)

}


Loading…
Cancel
Save