Skip to content

Commit

Permalink
Passing envs to re-define tmp dir for PISA
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaMolod committed Sep 25, 2024
1 parent 9ae04e2 commit f7cf93a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions alphapulldown/analysis_pipeline/pdb_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,17 @@ def run_and_summarise_pi_score(
try:
with tempfile.TemporaryDirectory() as temp_dir:
# Use temp_dir for temporary storage
# Set environment variables
env = os.environ.copy()
env["TMPDIR"] = temp_dir
env["PISA_TMPDIR"] = temp_dir
env["PISA_SESSIONDIR"] = temp_dir
env["SC_TMPDIR"] = temp_dir
env["SC_SESSIONDIR"] = temp_dir
env["HOME"] = temp_dir # Some utilities may use HOME
# Ensure /tmp/root exists and is writable (alternative to setting envs)
os.makedirs('/tmp/root', exist_ok=True)
os.chmod('/tmp/root', 0o777)
command = [
"bash", "-c",
f"source activate {python_env} && "
Expand Down

0 comments on commit f7cf93a

Please sign in to comment.