Skip to content
Snippets Groups Projects
Commit 8a822347 authored by Patrick Godwin's avatar Patrick Godwin Committed by Cody Messick
Browse files

set job working directory to be current working directory when using singularity

parent 9b034f4c
No related branches found
No related tags found
1 merge request!148Make DAGs more robust against file paths specified, allow frame caches with file transfer
......@@ -164,6 +164,14 @@ class Config:
if self.condor.transfer_files and x509_proxy:
submit_opts['x509userproxy'] = x509_proxy
submit_opts['use_x509userproxy'] = True
if not self.condor.transfer_files:
# set the job's working directory to be the same as the current
# working directory to match the behavior of vanilla jobs
if "environment" in submit_opts:
env_opts = submit_opts["environment"].strip('"')
submit_opts["environment"] = f'"{env_opts} SINGULARITY_PWD={self.rootdir}"'
else:
submit_opts["environment"] = f'"SINGULARITY_PWD={self.rootdir}"'
else:
submit_opts['getenv'] = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment