|
|
|
@@ -112,6 +112,7 @@ func CloudBrainNew(ctx *context.Context) { |
|
|
|
ctx.Data["dataset_path"] = cloudbrain.DataSetMountPath |
|
|
|
ctx.Data["model_path"] = cloudbrain.ModelMountPath |
|
|
|
ctx.Data["benchmark_path"] = cloudbrain.BenchMarkMountPath |
|
|
|
ctx.Data["is_benchmark_enabled"] = setting.IsBenchmarkEnabled |
|
|
|
ctx.HTML(200, tplCloudBrainNew) |
|
|
|
} |
|
|
|
|
|
|
|
@@ -133,7 +134,9 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
} |
|
|
|
|
|
|
|
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) |
|
|
|
if err != nil { |
|
|
|
|