From 96a2dbd283abc38f4917de1e14742fe4a32a3f81 Mon Sep 17 00:00:00 2001 From: Altan Orhon Date: Thu, 28 Sep 2023 15:24:32 -0700 Subject: [PATCH] Apptainer call --- hyakvnc/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hyakvnc/__main__.py b/hyakvnc/__main__.py index 14000f8..7a3ae4f 100644 --- a/hyakvnc/__main__.py +++ b/hyakvnc/__main__.py @@ -110,10 +110,12 @@ def create_node_signal_handler(signal_number, frame): # Template to name the apptainer instance: apptainer_instance_name = f"{app_config.apptainer_instance_prefix}-$SLURM_JOB_ID-{container_name}" # Command to start the apptainer instance: - apptainer_cmd = f"apptainer instance start {container_path} {apptainer_instance_name}" + apptainer_cmd = f"apptainer instance start --writable-tmpfs --cleanenv {container_path} {apptainer_instance_name}" # Command to start the apptainer instance and keep it running: - apptainer_cmd_with_rest = apptainer_env_vars_string + f"{apptainer_cmd} && while true; do sleep 10; done" + apptainer_cmd_with_rest = ( + apptainer_env_vars_string + "printenv && " + apptainer_cmd + " && while true; do sleep 10; done" + ) # The sbatch wrap functionality allows submitting commands without an sbatch script:t sbatch_opts["wrap"] = apptainer_cmd_with_rest