Skip to content

Commit

Permalink
Merge pull request #170 from tgen/fix_singularity_mount_cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-turner committed Nov 28, 2023
2 parents ecd8dfd + 70e35ad commit 9179967
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jetstream/backends/slurm_singularity.py
Expand Up @@ -544,18 +544,18 @@ async def sbatch(cmd, identity, singularity_image, singularity_executable="singu
for input_filename in input_filenames_glob:
input_filename = os.path.abspath(input_filename)
input_filename_head, input_filename_tail = os.path.split(input_filename)
if not input_filename_head.startswith(os.getcwd()):
if not input_filename_head.startswith(f'{os.getcwd()}/'):
singularity_mounts.add(input_filename_head)
else:
for input_filename in input_filenames:
input_filename = os.path.abspath(input_filename)
input_filename_head, input_filename_tail = os.path.split(input_filename)
if not input_filename_head.startswith(os.getcwd()):
if not input_filename_head.startswith(f'{os.getcwd()}/'):
singularity_mounts.add(input_filename_head)
for output_filename in output_filenames:
output_filename = os.path.abspath(output_filename)
output_filename_head, output_filename_tail = os.path.split(output_filename)
if not output_filename_head.startswith(os.getcwd()):
if not output_filename_head.startswith(f'{os.getcwd()}/'):
singularity_mounts.add(output_filename_head)
os.makedirs(output_filename_head, exist_ok=True)

Expand Down

0 comments on commit 9179967

Please sign in to comment.