Skip to content

Commit

Permalink
Merge pull request #67 from NERSC/lastephey/fix-build-args
Browse files Browse the repository at this point in the history
use default args for build, enable building on computes
  • Loading branch information
lastephey authored Jun 13, 2023
2 parents 2190476 + 6f8265d commit f826132
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion podman_hpc/siteconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class SiteConfig:
shared_run_exec_args = ["-e", "SLURM_*", "-e", "PALS_*", "-e", "PMI_*"]
default_run_args = []
default_pull_args = []
default_build_args = []
shared_run_command = ["sleep", "infinity"]
podman_bin = "podman"
mount_program = "fuse-overlayfs-warp"
Expand Down Expand Up @@ -117,6 +118,16 @@ def __init__(self, squash_dir=None, log_level=None):
"--runroot", self.run_root,
"--cgroup-manager", "cgroupfs",
]
if len(self.default_build_args) == 0:
self.default_build_args = [
"--root", self.graph_root,
"--runroot", self.run_root,
"--storage-opt",
f"mount_program={self.mount_program}",
"--storage-opt",
"ignore_chown_errors=true",
"--cgroup-manager", "cgroupfs",
]
self.log_level = log_level

def dump_config(self):
Expand Down Expand Up @@ -329,7 +340,7 @@ def get_cmd_extensions(self, subcommand, args):
if subcommand == "run":
cmds.extend(self.default_run_args)
elif subcommand == "build":
cmds = self.default_pull_args
cmds.extend(self.default_build_args)
for mod, mconf in self.sitemods.get(subcommand, {}).items():
if 'cli_arg' not in mconf:
continue
Expand Down

0 comments on commit f826132

Please sign in to comment.