@@ -14,19 +14,19 @@ proc ModulesHelp { } {
1414 puts stderr " - {{ container_sif }}"
1515 puts stderr " Commands include:"
1616 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>"
1818 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>"
2020 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> \" $@\" "
2222 puts stderr " - {{ prefix }}{{ flatname }}-inspect-runscript:"
2323 puts stderr " singularity inspect -r <container>"
2424 puts stderr " - {{ prefix }}{{ flatname }}-inspect-deffile:"
2525 puts stderr " singularity inspect -d <container>"
2626
2727{% 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 %}
3030
3131 puts stderr " For each of the above, you can export:"
3232
@@ -58,9 +58,9 @@ conflict {{ name }}
5858setenv SINGULARITY_SHELL {{ singularity_shell }}
5959
6060# 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}"
6464set inspectCmd " singularity \$ {SINGULARITY_OPTS} inspect \$ {SINGULARITY_COMMAND_OPTS} "
6565
6666# set_shell_function takes bashStr and cshStr
0 commit comments