@@ -14,19 +14,19 @@ proc ModulesHelp { } {
14
14
puts stderr " - {{ container_sif }}"
15
15
puts stderr " Commands include:"
16
16
puts stderr " - {{ prefix }}{{ flatname }}-run:"
17
- puts stderr " singularity run {% if bindpaths %}-B {{ bindpaths }} {% endif %}<container>"
17
+ puts stderr " singularity run {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }} {% endif %}<container>"
18
18
puts stderr " - {{ prefix }}{{ flatname }}-shell:"
19
- puts stderr " singularity shell -s {{ singularity_shell }} {% if bindpaths %}-B {{ bindpaths }} {% endif %}<container>"
19
+ puts stderr " singularity shell -s {{ singularity_shell }} {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }} {% endif %}<container>"
20
20
puts stderr " - {{ prefix }}{{ flatname }}-exec:"
21
- puts stderr " singularity exec -s {{ singularity_shell }} {% if bindpaths %}-B {{ bindpaths }} {% endif %}<container> \" $@\" "
21
+ puts stderr " singularity exec -s {{ singularity_shell }} {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }} {% endif %}<container> \" $@\" "
22
22
puts stderr " - {{ prefix }}{{ flatname }}-inspect-runscript:"
23
23
puts stderr " singularity inspect -r <container>"
24
24
puts stderr " - {{ prefix }}{{ flatname }}-inspect-deffile:"
25
25
puts stderr " singularity inspect -d <container>"
26
26
27
27
{% if aliases %}{% for alias in aliases %} puts stderr " - {{ alias.name }}:"
28
- puts stderr " singularity exec {% if bindpaths %}-B {{ bindpaths }} {% endif %}{% if alias.options %}{{ alias.options }} {% endif %}<container> {{ alias.command }}"
29
- {% endfor %}{% else %} puts stderr " - {{ prefix }}{{ flatname }}: singularity run {% if bindpaths %}-B {{ bindpaths }}{% endif %}<container>" {% endif %}
28
+ puts stderr " singularity exec {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }} {% endif %}{% if alias.options %}{{ alias.options }} {% endif %}<container> {{ alias.command }}"
29
+ {% endfor %}{% else %} puts stderr " - {{ prefix }}{{ flatname }}: singularity run {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %}<container>" {% endif %}
30
30
31
31
puts stderr " For each of the above, you can export:"
32
32
@@ -58,9 +58,9 @@ conflict {{ name }}
58
58
setenv SINGULARITY_SHELL {{ singularity_shell }}
59
59
60
60
# interactive shell to any container, plus exec for aliases
61
- set shellCmd " singularity \$ {SINGULARITY_OPTS} shell \$ {SINGULARITY_COMMAND_OPTS} -s {{ singularity_shell }} {% if bindpaths %}-B {{ bindpaths }}{% endif %} ${containerPath} "
62
- set execCmd " singularity \$ {SINGULARITY_OPTS} exec \$ {SINGULARITY_COMMAND_OPTS} {% if bindpaths %}-B {{ bindpaths }}{% endif %} "
63
- set runCmd " singularity \$ {SINGULARITY_OPTS} run \$ {SINGULARITY_COMMAND_OPTS} {% if bindpaths %}-B {{ bindpaths }}{% endif %} ${containerPath} \$ {SINGULARITY_COMMAND_ARGS}"
61
+ set shellCmd " singularity \$ {SINGULARITY_OPTS} shell \$ {SINGULARITY_COMMAND_OPTS} -s {{ singularity_shell }} {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} ${containerPath} "
62
+ set execCmd " singularity \$ {SINGULARITY_OPTS} exec \$ {SINGULARITY_COMMAND_OPTS} {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} "
63
+ set runCmd " singularity \$ {SINGULARITY_OPTS} run \$ {SINGULARITY_COMMAND_OPTS} {% if envfile %}-B {{ module_dir }}/{{ envfile }}:/.singularity.d/env/{{ envfile }}{% endif %} {% if bindpaths %}-B {{ bindpaths }}{% endif %} ${containerPath} \$ {SINGULARITY_COMMAND_ARGS}"
64
64
set inspectCmd " singularity \$ {SINGULARITY_OPTS} inspect \$ {SINGULARITY_COMMAND_OPTS} "
65
65
66
66
# set_shell_function takes bashStr and cshStr
0 commit comments