|
|
@@ -847,6 +847,9 @@ func createForGPU(ctx *context.Context, jobName string) error { |
|
|
|
codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath |
|
|
|
os.RemoveAll(codePath) |
|
|
|
|
|
|
|
gitRepo, _ := git.OpenRepository(repo.RepoPath()) |
|
|
|
commitID, _ := gitRepo.GetBranchCommitID(cloudbrain.DefaultBranchName) |
|
|
|
|
|
|
|
if err := downloadCode(repo, codePath, cloudbrain.DefaultBranchName); err != nil { |
|
|
|
log.Error("downloadCode failed, %v", err, ctx.Data["MsgID"]) |
|
|
|
return errors.New("system error") |
|
|
@@ -891,7 +894,7 @@ func createForGPU(ctx *context.Context, jobName string) error { |
|
|
|
BranchName: cloudbrain.DefaultBranchName, |
|
|
|
BootFile: BootFile, |
|
|
|
Params: Params, |
|
|
|
CommitID: "", |
|
|
|
CommitID: commitID, |
|
|
|
ModelName: modelName, |
|
|
|
ModelVersion: modelVersion, |
|
|
|
CkptName: CkptName, |
|
|
|