diff --git a/scripts/dispatcher.py b/scripts/dispatcher.py index 3986108..a8ba997 100644 --- a/scripts/dispatcher.py +++ b/scripts/dispatcher.py @@ -428,9 +428,10 @@ def _extract_on_remote_host(job_id: int, worker: dict, src_host: str, src_path: set_status(job_id, step=f"scp frames {vid_num}/{n_videos} -> {worker['host']}") print(f" scp frames {remote_tmp}/ -> {worker['host']}:{frames_dir}/") + # Use glob instead of -r to copy files directly (scp -r creates a subdir named after source) pull_cmd = ( - f"scp -r -o BatchMode=yes " - f"{shlex.quote(src_host)}:{shlex.quote(remote_tmp + '/')} " + f"scp -o BatchMode=yes " + f"'{src_host}:{remote_tmp}/frame_*.jpg' " f"{shlex.quote(frames_dir)}/" ) rc2, _, err2 = ssh(worker["ssh_alias"], pull_cmd, timeout=3600)