Skip to content

Commit 01aba0c

Browse files
committed
print warning about mode 'run'
1 parent 65d3c21 commit 01aba0c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

eessi_container.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ display_help() {
8686
echo " [default: /..storage../opt-eessi]"
8787
echo " -l | --list-repos - list available repository identifiers [default: false]"
8888
echo " -m | --mode MODE - with MODE==shell (launch interactive shell) or"
89-
echo " MODE==run (run a script or command) [default: shell]"
89+
echo " MODE==exec/run (run a script or command) [default: shell]"
9090
echo " -n | --nvidia MODE - configure the container to work with NVIDIA GPUs,"
9191
echo " MODE==install for a CUDA installation, MODE==run to"
9292
echo " attach a GPU, MODE==all for both [default: false]"
@@ -119,7 +119,7 @@ display_help() {
119119
echo " -y | --https-proxy URL - provides URL for the env variable https_proxy"
120120
echo " [default: not set]; uses env var \$https_proxy if set"
121121
echo
122-
echo " If value for --mode is 'run', the SCRIPT/COMMAND provided is executed. If"
122+
echo " If value for --mode is 'exec' or 'run', the SCRIPT/COMMAND provided is executed. If"
123123
echo " arguments to the script/command start with '-' or '--', use the flag terminator"
124124
echo " '--' to let eessi_container.sh stop parsing arguments."
125125
}
@@ -383,6 +383,9 @@ fi
383383

384384
# the run mode should actually call "apptainer exec", so simply override run to exec
385385
if [[ "${MODE}" == "run" ]]; then
386+
echo_yellow "Note: the behaviour of the run mode has changed."
387+
echo_yellow "Previously, it mistakenly ran 'apptainer/singularity run', but it now runs 'apptainer/singularity exec' instead."
388+
echo_yellow "You can silence this message by using --mode exec instead of --mode run."
386389
MODE="exec"
387390
fi
388391

0 commit comments

Comments
 (0)