Can i run singularity containers with Podman?

641 views
Skip to first unread message

Samy

unread,
Dec 21, 2020, 7:44:59 PM12/21/20
to singularity
Hello everyone,

I have some singularity containers that I need to run on an HPC cluster but they only have Podman installed (They refused to install singularity).

does anyone know if i can run Singularity containers on Podman with minimal effort? both on single node and multinode using slurm or mpi.

And  if so, any examples would be appreciate it.

Thank you,

Sam

v

unread,
Dec 21, 2020, 8:00:24 PM12/21/20
to singu...@lbl.gov
I don't know of any way to use a different container technology to run a singularity container. Minimally you could convert your containers to Docker, and then push to a registry and pull with podman. Check out https://github.com/singularityhub/singularity2docker for an old script I wrote to do that (might need updates for newer singularity, I haven't looked in a while).

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/36335f6a-ed0d-4943-9009-fdd0d5c66ea5n%40lbl.gov.

Dave Dykstra

unread,
Dec 22, 2020, 6:00:09 PM12/22/20
to singu...@lbl.gov
Sam,

I tried getting podman to run unpacked "sandbox" mode singularity
containers, including getting advice from a podman developer.
Theoretically it should be able to be done but I ran into some practical
problems that have perhaps been fixed since then. One of the biggest
problems in my opinion is that podman requires there to be at least two
user ids available in the container. If podman works already though
you probably won't have an issue with that. I got the furthest with
the options
podman run --rm -it --userns=keep-id --cgroup-manager cgroupfs \
--events-backend file --rootfs $(pwd)/rootfs bash
where $(pwd)/rootfs contained an unpacked singularity container.

On the other hand, if podman works, you could install and run
singularity as an unprivileged user yourself. Currently unprivileged
singularity also requires the containers to be sandbox mode, not a .sif
file. If you don't want to compile it from source, and your HPC is
based on RHEL7 or later, you might want to check out my tool cvmfsexec
https://github.com/cvmfs-contrib/cvmfsexec
If that works then you should be able to run
cvmfsexec oasis.opensciencegrid.org -- \
/cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity
and as a bonus will have access to everything else installed in cvmfs
including a bunch of containers in /cvmfs/singularity.opensciencegrid.org.

Dave

Carlos Eduardo Arango Gutierrez

unread,
Feb 23, 2022, 10:14:28 AM2/23/22
to singularity, Samy
Hi 

You can run SIF images with podman! 
Reply all
Reply to author
Forward
0 new messages