File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 368368# HOST_STORAGE_ERROR_EXITCODE
369369
370370# (arg -m|--mode) check if MODE is known
371- if [[ " ${MODE} " != " shell" && " ${MODE} " != " run" ]]; then
371+ if [[ " ${MODE} " != " shell" && " ${MODE} " != " exec " && " ${MODE} " != " run" ]]; then
372372 fatal_error " unknown execution mode '${MODE} '" " ${MODE_UNKNOWN_EXITCODE} "
373373fi
374374
375+ # the run mode should actually call "apptainer exec", so simply override run to exec
376+ if [[ " ${MODE} " == " run" ]]; then
377+ MODE=" exec"
378+ fi
379+
375380# Also validate the NVIDIA GPU mode (if present)
376381if [[ ${SETUP_NVIDIA} -eq 1 ]]; then
377382 if [[ " ${NVIDIA_MODE} " != " run" && " ${NVIDIA_MODE} " != " install" && " ${NVIDIA_MODE} " != " all" ]]; then
434439# TODO (arg -y|--https-proxy) check if https proxy is accessible
435440# HTTPS_PROXY_ERROR_EXITCODE
436441
437- # check if a script is provided if mode is 'run '
438- if [[ " ${MODE} " == " run " ]]; then
442+ # check if a script is provided if mode is 'exec '
443+ if [[ " ${MODE} " == " exec " ]]; then
439444 if [[ $# -eq 0 ]]; then
440445 fatal_error " no command specified to run?!" " ${RUN_SCRIPT_MISSING_EXITCODE} "
441446 fi
You can’t perform that action at this time.
0 commit comments