@@ -46,13 +46,12 @@ local MODULEPATH="{{ module_dir }}"
46
46
setenv (" SINGULARITY_SHELL" , " {{ singularity_shell }}" )
47
47
setenv (" SINGULARITY_OPTS" , " " )
48
48
setenv (" SINGULARITY_COMMAND_OPTS" , " " )
49
- setenv (" SINGULARITY_COMMAND_ARGS" , " " )
50
49
51
50
-- interactive shell to any container, plus exec for aliases
52
51
local containerPath = ' {{ container_sif }}'
53
52
local shellCmd = " singularity ${SINGULARITY_OPTS} shell ${SINGULARITY_COMMAND_OPTS} -s {{ singularity_shell }} {% if features.gpu %}{{ features.gpu }} {% endif %}{% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} " .. containerPath
54
53
local execCmd = " singularity ${SINGULARITY_OPTS} exec ${SINGULARITY_COMMAND_OPTS} {% if features.gpu %}{{ features.gpu }} {% endif %}{% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} "
55
- local runCmd = " singularity ${SINGULARITY_OPTS} run ${SINGULARITY_COMMAND_OPTS} {% if features.gpu %}{{ features.gpu }} {% endif %}{% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} " .. containerPath .. " ${SINGULARITY_COMMAND_ARGS} "
54
+ local runCmd = " singularity ${SINGULARITY_OPTS} run ${SINGULARITY_COMMAND_OPTS} {% if features.gpu %}{{ features.gpu }} {% endif %}{% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} " .. containerPath
56
55
local inspectCmd = " singularity ${SINGULARITY_OPTS} inspect ${SINGULARITY_COMMAND_OPTS} "
57
56
58
57
-- set_shell_function takes bashStr and cshStr
@@ -73,7 +72,7 @@ if (myShellName() == "bash") then
73
72
end {% endif % }
74
73
75
74
-- A customizable exec function
76
- set_shell_function (" {|module_name|}-exec" , execCmd .. containerPath .. " ${SINGULARITY_COMMAND_ARGS} $ @" , execCmd .. containerPath .. " ${SINGULARITY_COMMAND_ARGS} " )
75
+ set_shell_function (" {|module_name|}-exec" , execCmd .. containerPath .. " $@" , execCmd .. containerPath )
77
76
78
77
-- Always provide a container run
79
78
set_shell_function (" {|module_name|}-run" , runCmd .. " $@" , runCmd )
0 commit comments