-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding podman as container base #373
Conversation
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
The container.yaml recipe files should be agnostic to the container technology, meaning that instead of an option like --nv specific to singularity, we have gpu: true, and then the container technology that is loaded can add the flags appropriate for that feature. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
unless the user adds --short, in which case the tags will again be combined into a single list alongside the container name. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
…/tag Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
2df3ed5
to
6840386
Compare
All right, some tests with First comment:
Similar to the behaviour for Singularity, shall the details of the pull output be hidden by default? (is there a verbose/debug option for |
Also, the directory structure for the containers is not required by podman:
So, it should be probably ignored by install/uninstall and other commands? (then use only |
This is a bit awful, but it's not a problem due to SHPC: Creating host files with e.g. a ubuntu container works:
Some containers define a different user (I guess this is the problem), and then file creation does not work:
Even if I force set the same user as host with |
Then, one difference around default work directory in the container:
I am wondering whether such syntax should be added to all aliases. Otherwise this won't work (here I have edited the modulefile manually):
|
Having issues executing simple commands such as
I had a look at the modulefile, there were 3 missing spaces in the definition of -exec; the right one looks like:
Even with this edit, still having issues:
I think this is related to the use of entrypoint, but don't have more insights right now |
Last one for this set of tests, seems like when using podman as runtime the version tag gets lost in the alias names:
|
Responding to comments!
The reason singularity is hidden by the nice command is that I use the spython client under the hood - and this will handle showing any issue if it arises. Podman seems to have podman-py, but it didn't work for me to pull, and it also seems geared toward interaction via a socket to do things like list local manifests. I chose to not add it and do simple subprocess commands instead, and show the output to the user so if something goes wrong it's easy to see. Ideally podman would have a python client that just works out of the box to better handle the UI, and that's something I could contribute if the need arises and there is heavy use here. But for now I think it's probably okay just to show the pull.
This is a good point! I think (since we derive installed from modules) we can just clean up this directory after an install if it's not in use. I'll need to take a look at the python container again - I also had trouble with those commands (I think I got a few working but it looks like not all!) For the alias names I was debating this - should they really have the version? E.g., why would someone load two python executables of different versions? I was thinking of removing that from the Singularity file so the aliases would look more like normal commands. What do you think? |
18eca0a
to
7de7eeb
Compare
Ah I see, the issue is that /bin/echo works best as the entrypoint: $ podman run -it --rm --entrypoint /bin/echo docker.io/library/python:3.9.5-alpine hello
hello It looks like this works running on the host: podman run -it --rm --entrypoint /bin/sh docker.io/library/python:3.9.5-alpine -c “echo hello”
hello But when I add that logic to the module file (the update here) it prints an empty line. Do you know why maybe the args aren't being passed in the modulefile? |
0aa73ae
to
d75954c
Compare
Oh, noticed a typo that needs fixing in the modulefile |
0c9f2ae
to
34276e0
Compare
3491784
to
c7ed10e
Compare
…ctures Signed-off-by: vsoch <vsoch@users.noreply.github.com>
okay! It possibly can't be perfect (there are always bugs) but I am happy enough with these changes (and they are a great improvement on the current main) to call this PR finished and merge and release. After this I can start working on Shifter, Docker, and other container technologies. |
This is so exciting!! :-) |
This is a first shot at adding podman, and re-organizing the library so that most interactions are now part of the container class (as they differ between podman and singularity). This also includes commits from #367 so the PR looks larger than it really is. This needs to be tested on a cluster, and I'm also not sure about podman being available in GitHub actions but I think it might be ? actions/runner-images#320