From 9c8a61851f185fa5bc66036519b905501bf48179 Mon Sep 17 00:00:00 2001 From: openihu Date: Tue, 28 Jun 2022 10:16:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=B8=AD=E6=9C=89=E8=B6=85=E9=95=BF=E7=BD=91=E5=9D=80=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E5=86=85=E5=AE=B9=E7=9C=81=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/user/dashboard/feeds.tmpl | 6 +++--- web_src/less/_base.less | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 web_src/less/_base.less diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index 82313d736..e43191470 100755 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -111,11 +111,11 @@ {{index .GetIssueInfos 1 | RenderEmoji}} {{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}} {{.GetIssueTitle | RenderEmoji}} -

{{index .GetIssueInfos 1 | RenderEmoji}}

+

{{index .GetIssueInfos 1 | RenderEmoji}}

{{else if eq .GetOpType 11}} -

{{index .GetIssueInfos 1}}

+

{{index .GetIssueInfos 1}}

{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}} - {{.GetIssueTitle | RenderEmoji}} + {{.GetIssueTitle | RenderEmoji}} {{end}}

{{TimeSince .GetCreate $.i18n.Lang}}

diff --git a/web_src/less/_base.less b/web_src/less/_base.less old mode 100644 new mode 100755 index 951cd881e..8d7c052fe --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -489,6 +489,9 @@ code, white-space: nowrap; display: inline-block; } + &.pre-wrap{ + white-space:pre-wrap!important; + } &.thin { font-weight: normal; From 885af4554da9a6e49ffbaf810a1c48f46b402f72 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Mon, 4 Jul 2022 11:41:06 +0800 Subject: [PATCH 2/2] fix trans --- routers/repo/grampus.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index 52f803d1d..261d830d2 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -422,7 +422,7 @@ func GrampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrain } //prepare command - command, err := generateCommand(repo.Name, grampus.ProcessorTypeNPU, codeObsPath+cloudbrain.DefaultBranchName+".zip", dataObsPath+attachment.Name, bootFile, params, setting.CodePathPrefix+jobName+modelarts.OutputPath, attachment.Name) + command, err := generateCommand(repo.Name, grampus.ProcessorTypeNPU, codeObsPath+cloudbrain.DefaultBranchName+".zip", dataObsPath+"'"+attachment.Name+"'", bootFile, params, setting.CodePathPrefix+jobName+modelarts.OutputPath, attachment.Name) if err != nil { log.Error("Failed to generateCommand: %s (%v)", displayJobName, err, ctx.Data["MsgID"]) grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeNPU) @@ -672,10 +672,10 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo command += "pwd;cd " + workDir + grampus.CommandPrepareScript //download code & dataset if processorType == grampus.ProcessorTypeNPU { - commandDownload := "./downloader_for_obs " + setting.Bucket + " " + codeRemotePath + " " + grampus.CodeArchiveName + " " + dataRemotePath + " " + datasetName + ";" + commandDownload := "./downloader_for_obs " + setting.Bucket + " " + codeRemotePath + " " + grampus.CodeArchiveName + " " + dataRemotePath + " '" + datasetName + "';" command += commandDownload } else if processorType == grampus.ProcessorTypeGPU { - commandDownload := "./downloader_for_minio " + setting.Grampus.Env + " " + codeRemotePath + " " + grampus.CodeArchiveName + " " + dataRemotePath + " " + datasetName + ";" + commandDownload := "./downloader_for_minio " + setting.Grampus.Env + " " + codeRemotePath + " " + grampus.CodeArchiveName + " " + dataRemotePath + " '" + datasetName + "';" command += commandDownload } @@ -684,11 +684,11 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo command += commandCheckRes //unzip code & dataset - toolUnzip := "unzip -q " + toolUnzip := "unzip -q '" if strings.HasSuffix(datasetName, ".tar.gz") { - toolUnzip = "tar -zxvf " + toolUnzip = "tar -zxvf '" } - commandUnzip := "cd " + workDir + "code;unzip -q master.zip;echo \"start to unzip dataset\";cd " + workDir + "dataset;" + toolUnzip + datasetName + ";" + commandUnzip := "cd " + workDir + "code;unzip -q master.zip;echo \"start to unzip dataset\";cd " + workDir + "dataset;" + toolUnzip + datasetName + "';" command += commandUnzip //check unzip result