Skip to content

Commit

Permalink
Fixed apptainer env vars setting
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Sep 20, 2023
1 parent 7247d28 commit 7982608
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hyakvnc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ def __post_init__(self) -> None:
self.mem = self.mem or get_first_env(["HYAKVNC_SLURM_MEM", "SBATCH_MEM"], None)
self.cpus = self.cpus or get_first_env(["HYAKVNC_SLURM_CPUS", "SBATCH_CPUS_PER_TASK"], None)

if self.apptainer_env_vars is None:
self.apptainer_env_vars = {}

all_apptainer_env_vars = {x: os.environ.get(x, "") for x in os.environ.keys() if
x.startswith("APPTAINER_") or x.startswith("APPTAINERENV_") or x.startswith(
"SINGULARITY_") or x.startswith("SINGULARITYENV_")}
self.apptainer_env_vars = self.apptainer_env_vars or {}
self.apptainer_env_vars = self.apptainer_env_vars.update(all_apptainer_env_vars)

if self.apptainer_use_writable_tmpfs is not None:
Expand Down

0 comments on commit 7982608

Please sign in to comment.