Skip to content

Commit db6b60e

Browse files
committed
Mount base remote dir for symlinks
Signed-off-by: Hemil Desai <[email protected]>
1 parent d03963a commit db6b60e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/nemo_run/core/execution/slurm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,13 @@ def package(self, packager: Packager, job_name: str):
563563
src_path=packager.symlink_from_remote_dir,
564564
dst_path=os.path.join(self.tunnel.job_dir, Path(self.job_dir).name, "code"),
565565
)
566+
567+
# Tunnel job dir is the directory of the experiment id, so the base job dir is two levels up
568+
base_remote_dir = str(Path(self.tunnel.job_dir).parent.parent)
569+
base_remote_mount = f"{base_remote_dir}:{base_remote_dir}"
570+
if base_remote_mount not in self.container_mounts:
571+
self.container_mounts.append(f"{base_remote_dir}:{base_remote_dir}")
572+
566573
return
567574

568575
assert self.experiment_id, "Executor not assigned to an experiment."

0 commit comments

Comments
 (0)