This commit is contained in:
2026-08-27 09:31:41 +08:00
parent d81a0af7dd
commit 0ca8f4c3ab
2 changed files with 2 additions and 1 deletions
+2 -1
View File
@@ -281,7 +281,8 @@ func (r *sshRunner) runCmd(ctx context.Context, job *TrainingJob, cmd string) (s
func (r *sshRunner) Start(ctx context.Context, job *TrainingJob) (int, error) {
taskJson := filepath.Join(job.Workdir, "tasks", fmt.Sprintf("%d.json", job.TaskId))
cmd := fmt.Sprintf("cd %s && nohup %s train_server.py --task-json %s > logs/%d.stdout 2>&1 & echo $!",
// logs/ 由 bash 重定向所需,须先建(train_server.py 只建 jsonl/结果/产物的父目录)
cmd := fmt.Sprintf("cd %s && mkdir -p logs && nohup %s train_server.py --task-json %s > logs/%d.stdout 2>&1 & echo $!",
job.Workdir, job.Python, taskJson, job.TaskId)
out, err := r.runCmd(ctx, job, cmd)
if err != nil {
Binary file not shown.