Running Images
There are three main ways to run a Singularity image on OSCAR. As an interactive shell, using the exec command, or building a runscript and using the run command.
Last updated
Was this helpful?
There are three main ways to run a Singularity image on OSCAR. As an interactive shell, using the exec command, or building a runscript and using the run command.
Last updated
Was this helpful?
The most likely usage of your singularity environment will be via utilizing either or . These can be directly executed via a batch script or through an interactive job in place of your traditional execution scripts. For more information about the methods of running a singularity image, the guide is pretty handy.
This will launch an interactive shell within a singularity instance based on the designated image. This should be used when you are testing/debugging the image or intend to use it via the interact/VNC methods.
This method is only applicable when working with an interact slurm job, or via the terminal within a VNC session.
The next method is to launch the image with a defined set of instructions. This will launch the singularity image, and execute whatever commands are defined by the user.
Here, the commands can range from running a script, loading modules, or piping multiple instructions together. To see an example of this process, see the Example - Tensorflow section where we execute a script to run within the singularity image.
The last method we will go over here is via singularities run command, which will execute a series of instructions provided to the image in the form of a runscript. This script will automatically execute if the image is either launch using the run command, or if the singularity image is directly executed.
or
In both cases, we are executing the container’s “runscript” (the executable /singularity
at the root of the image).
For more information about singularity run and the associated runscript, we recommend the run documentation using singularity run help
or visiting the documentation.