| @@ -1055,6 +1055,9 @@ DEBUG_SERVER_HOST = http://192.168.202.73/ | |||||
| USER = cW4cMtH24eoWPE7X | USER = cW4cMtH24eoWPE7X | ||||
| PWD = 4BPmgvK2hb2Eywwyp4YZRY4B7yQf4DA.C | PWD = 4BPmgvK2hb2Eywwyp4YZRY4B7yQf4DA.C | ||||
| JOB_TYPE = debug_openi | JOB_TYPE = debug_openi | ||||
| [benchmark] | |||||
| ENABLED = true | |||||
| BENCHMARKCODE = https://yangzhx:justfortest123@git.openi.org.cn/yangzhx/detection_benchmark_script.git | BENCHMARKCODE = https://yangzhx:justfortest123@git.openi.org.cn/yangzhx/detection_benchmark_script.git | ||||
| [decompress] | [decompress] | ||||
| @@ -438,6 +438,9 @@ var ( | |||||
| JobPath string | JobPath string | ||||
| JobType string | JobType string | ||||
| DebugServerHost string | DebugServerHost string | ||||
| //benchmark config | |||||
| IsBenchmarkEnabled bool | |||||
| BenchmarkCode string | BenchmarkCode string | ||||
| ) | ) | ||||
| @@ -1114,6 +1117,9 @@ func NewContext() { | |||||
| JobPath = sec.Key("JOB_PATH").MustString("/datasets/minio/data/opendata/jobs/") | JobPath = sec.Key("JOB_PATH").MustString("/datasets/minio/data/opendata/jobs/") | ||||
| DebugServerHost = sec.Key("DEBUG_SERVER_HOST").MustString("http://192.168.202.73") | DebugServerHost = sec.Key("DEBUG_SERVER_HOST").MustString("http://192.168.202.73") | ||||
| JobType = sec.Key("JOB_TYPE").MustString("debug_openi") | JobType = sec.Key("JOB_TYPE").MustString("debug_openi") | ||||
| sec = Cfg.Section("benchmark") | |||||
| IsBenchmarkEnabled = sec.Key("ENABLED").MustBool(false) | |||||
| BenchmarkCode = sec.Key("BENCHMARKCODE").MustString("https://yangzhx:justfortest123@git.openi.org.cn/yangzhx/detection_benchmark_script.git") | BenchmarkCode = sec.Key("BENCHMARKCODE").MustString("https://yangzhx:justfortest123@git.openi.org.cn/yangzhx/detection_benchmark_script.git") | ||||
| } | } | ||||
| @@ -112,6 +112,7 @@ func CloudBrainNew(ctx *context.Context) { | |||||
| ctx.Data["dataset_path"] = cloudbrain.DataSetMountPath | ctx.Data["dataset_path"] = cloudbrain.DataSetMountPath | ||||
| ctx.Data["model_path"] = cloudbrain.ModelMountPath | ctx.Data["model_path"] = cloudbrain.ModelMountPath | ||||
| ctx.Data["benchmark_path"] = cloudbrain.BenchMarkMountPath | ctx.Data["benchmark_path"] = cloudbrain.BenchMarkMountPath | ||||
| ctx.Data["is_benchmark_enabled"] = setting.IsBenchmarkEnabled | |||||
| ctx.HTML(200, tplCloudBrainNew) | ctx.HTML(200, tplCloudBrainNew) | ||||
| } | } | ||||
| @@ -133,7 +134,9 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||||
| } | } | ||||
| benchmarkPath := setting.JobPath + jobName + cloudbrain.BenchMarkMountPath | benchmarkPath := setting.JobPath + jobName + cloudbrain.BenchMarkMountPath | ||||
| downloadBenchmarkCode(repo, jobName, benchmarkPath) | |||||
| if setting.IsBenchmarkEnabled { | |||||
| downloadBenchmarkCode(repo, jobName, benchmarkPath) | |||||
| } | |||||
| err = cloudbrain.GenerateTask(ctx, jobName, image, command, uuid, codePath, modelPath, benchmarkPath) | err = cloudbrain.GenerateTask(ctx, jobName, image, command, uuid, codePath, modelPath, benchmarkPath) | ||||
| if err != nil { | if err != nil { | ||||