Skip to content

Conversation

vsoch
Copy link
Member

@vsoch vsoch commented Jun 7, 2021

This PR include several bug fixes or updates, specially:

Signed-off-by: vsoch vsoch@users.noreply.github.com

@vsoch vsoch force-pushed the updates/notation branch 4 times, most recently from c1f9dd6 to 990f5b5 Compare June 7, 2021 23:24
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@vsoch vsoch force-pushed the updates/notation branch from 6d3b635 to e94498f Compare June 7, 2021 23:47
@marcodelapierre
Copy link
Contributor

On module name conflict, as I mentioned in #395, It's probably good to leave the full name, as it prevents from accidentally loading two versions of the same SHPC container module. So ... can it be added for Lua, too?

On the Docker/Podman optional env variables (as in my comment to #391), I was wondering ... instead of using DOCKER for Podman, too ... how about using PODMAN for Docker ...? too daring ...? after all SHPC is more focused on HPC, Docker is kind of a free add-on feature

@marcodelapierre
Copy link
Contributor

{{ namespace }} should be changed to {{ repository }} also in the comment in settings.yaml

@vsoch
Copy link
Member Author

vsoch commented Jun 8, 2021

On module name conflict, as I mentioned in #395, It's probably good to leave the full name, as it prevents from accidentally loading two versions of the same SHPC container module. So ... can it be added for Lua, too?

Added back! For Lua I didn't add {{ name }} because I thought that myModuleName() would translate to that. But if it does not (?) I definitely can.

On the Docker/Podman optional env variables (as in my comment to #391), I was wondering ... instead of using DOCKER for Podman, too ... how about using PODMAN for Docker ...? too daring ...? after all SHPC is more focused on HPC, Docker is kind of a free add-on feature

Let's be daring!

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@marcodelapierre
Copy link
Contributor

Testing related GH issues, and new features.

All good but this one:

Help block in Podman modulefile:

  • -v ${PWD} -w ${PWD} missing in <tool>-run and <tool>-shell
  • --entrypoint /bin/sh missing for <tool>-shell (I guess that /bin/sh is actually a variable taken from settings.yaml)

@marcodelapierre
Copy link
Contributor

Note that issues #378 and #398 are also solved by this PR :-)

@vsoch
Copy link
Member Author

vsoch commented Jun 8, 2021

@marcodelapierre I don't see those issues in either docker.tcl or docker.lua - could you comment directly on the code here to point them out?

@vsoch vsoch force-pushed the updates/notation branch from 0e7d05e to d075fcb Compare June 8, 2021 14:47
this is do-able because we disable validation when edit is being
used.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@vsoch vsoch force-pushed the updates/notation branch from d075fcb to 2d43610 Compare June 8, 2021 14:49
@vsoch vsoch merged commit 095ab18 into main Jun 8, 2021
@vsoch vsoch deleted the updates/notation branch June 8, 2021 15:05
@marcodelapierre
Copy link
Contributor

@vsoch it's only for Lua, in lines from 18 on of docker.lua:

 - {|module_name|}-run:
       {{ command }} run -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} -v ${PWD} -w ${PWD} {% endif %}<container> "$@"
 - {|module_name|}-shell:
       {{ command }} run -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} --entrypoint {{ shell }} -v ${PWD} -w ${PWD} {% endif %}<container>
 - {|module_name|}-exec:
       {{ command }} run -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm --entrypoint "" {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} <container> "$@"

For shell and exec,
There's a misplaced {% endif %} that should go straight after {% if bindpaths %}-v {{ bindpaths }}

@marcodelapierre
Copy link
Contributor

In the TCL module files for Podman, I actually notice other issues (had not checked before):

help screen:

  • missing --rm for alias commands
  • for <tool-exec> entrypoint should NOT be --entrypoint /bin/sh but instead --entrypoint ""

actual command definitions:

  • set execCmd misses -v $workdir -w $workdir
  • alias commands should have NOTHING after ${containerPath} (right now the command is repeated, but it's already in the entrypoint)

@vsoch
Copy link
Member Author

vsoch commented Jun 9, 2021

alias commands should have NOTHING after ${containerPath} (right now the command is repeated, but it's already in the entrypoint)

This is because some aliases have other arguments following the executable. If it's repeated it's a bug with deriving alias.entrypoing vs. alias.args, let me take a look. (Update, can confirm it was using alias.command instead of alias args, will fix!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants