Skip to content

Commit

Permalink
fix /local tmpdir mounting (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanMarx authored Oct 31, 2024
1 parent 2bb1a4c commit 6c1b577
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
12 changes: 8 additions & 4 deletions aframe/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ def _get_volumes(self):
# bind users /local directory for
# storing large tmp files,
# e.g. for local storage before
# being dumped to s3 by luigi
tmpdir = f"/local/{os.getenv('USER')}"
volumes[tmpdir] = tmpdir
# being dumped to s3 by luigi;
# only bind if this directory exists,
# since for condor jobs /local might not
local = f"/local/{os.getenv('USER')}"
if os.path.exists(local):
volumes[local] = local

# bind aws directory that contains s3 credentials
aws_dir = os.path.expanduser("~/.aws/")
Expand Down Expand Up @@ -162,7 +165,8 @@ def sandbox_env(self, _):
# luigi/law will write temporary files to disk before
# they are sent to s3
local = f"/local/{os.getenv('USER')}"
env["TMPDIR"] = local
if os.path.exists(local):
env["TMPDIR"] = local

# location for storing "temporary" files
# that will eventually be merged (and uploaded to s3)
Expand Down
4 changes: 2 additions & 2 deletions aframe/pipelines/sandbox/configs/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ coalescence_time = &::luigi_base::coalescence_time
prior = &::luigi_base::prior
snr_threshold = 4
request_memory = 6GB
request_disk = 1024KB
request_disk = 10MB
request_cpus = 1

[luigi_FetchTest]
Expand Down Expand Up @@ -122,7 +122,7 @@ waveform_approximant = &::luigi_base::waveform_approximant
coalescence_time = &::luigi_base::coalescence_time
highpass = &::luigi_base::highpass
request_memory = 6GB
request_disk = 1024KB
request_disk = 10MB
request_cpus = 1

[luigi_ExportLocal]
Expand Down
1 change: 0 additions & 1 deletion aframe/tasks/data/condor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def build_environment(self):
environment += f'PATH={os.getenv("PATH")} '
environment += f"LAW_CONFIG_FILE={self.law_config} "
environment += f"USER={os.getenv('USER')} "
environment += f"TMPDIR={os.getenv('TMPDIR')} "

# forward any env variables that start with AFRAME_
# that the law config may need to parse
Expand Down

0 comments on commit 6c1b577

Please sign in to comment.