For more information regarding building a singularity container, the Building a Container documentation is excellent and we recommend becoming familiar with it.
You can use the
build command to download a container from Singularity Hub.
$ singularity build <finalImageName>.simg shub://<singularityHubURL>
The first argument (
<finalImageName>.simg) specifies a path and name for your container. The second argument (
shub://<singularityHubURL>) gives the Singularity Hub URI from which to download.
If you already have a desired docker container that you would like to build as a singularity image for use on OSCAR, you can build directly from dockerHub using the build command:
$ singularity build <finalImageName>.simg docker://<dockerHubURL>
This will pull the docker image from DockerHub and build it as a singularity image locally.