Skip to content

Commit

Permalink
Mount base remote dir for symlinks
Browse files Browse the repository at this point in the history
Signed-off-by: Hemil Desai <[email protected]>
  • Loading branch information
hemildesai committed Dec 17, 2024
1 parent d03963a commit db6b60e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nemo_run/core/execution/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,13 @@ def package(self, packager: Packager, job_name: str):
src_path=packager.symlink_from_remote_dir,
dst_path=os.path.join(self.tunnel.job_dir, Path(self.job_dir).name, "code"),
)

# Tunnel job dir is the directory of the experiment id, so the base job dir is two levels up
base_remote_dir = str(Path(self.tunnel.job_dir).parent.parent)
base_remote_mount = f"{base_remote_dir}:{base_remote_dir}"
if base_remote_mount not in self.container_mounts:
self.container_mounts.append(f"{base_remote_dir}:{base_remote_dir}")

return

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

0 comments on commit db6b60e

Please sign in to comment.