Singularity Run or Execute Command as the Same as Docker Run

I am working under a university's HPC system, which has only singularity installed and without docker. I want to run an already singularity-pulled docker image (julia_adfem_v1.sif). The original command for the docker environment is docker run -ti kailaix/adcme . What's it for singularity?

I have tried something like singularity exec ./julia_adfem_v1.sif kailaix/adcme but not sucessful.

2 Answers

From your question, there are two different images

  1. julia_adfem_v1.sif (an image that is already there locally)
  2. kailaix/adcme (an image from docker hub)

Let me talk about case 1:

Note: julia_adfem_v1.sif is a container file.

To run:

singularity run julia_adfem_v1.sif

To exec with some command:

singularity exec julia_adfem_v1.sif echo "It's working!"

Let me talk about case 2:

Note: kailaix/adcme is a docker hub image file.

To run:

singularity run docker://kailaix/adcme

To exec with some command:

singularity exec docker://kailaix/adcme echo "It's working"
1

If you want to run a container from the docker registry, you can use the following:

singularity run docker://kailaix/adcme

If you want to exec something on the container, you can use:

singularity exec docker://kailaix/adcme echo "test"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest