Singularity Commands


Table of Contents

  1. Accessing container shell
  2. Running shell a command with Container image
  3. Running batch script with Container image
  4. External resources

Acessing container shell

To access the shell environment on your Apptainer image run the command:

apptainer shell image_name.simg

This will start an interactive session with the container environment. You can run scripts while in the session as the same user.

You can make use of the interactive session capabilities of Spiedie to run your programs in this way. Click here for more information.

Running shell a command with Container image

You can execute commands as you would on a shell script using Apptainer.

apptainer exec image_name.simg shell_command

Apptainer can be combined with SLURM seamlessly by issuing Apptainer commands with srun and sbatch. Click here for more information on running jobs.

Running batch script with Container image

You can also run scripts using the Apptainer image, by running:

apptainer run image_name.simg run_script.sh

External resources

For more advanced features of Apptainer framework, consult the Apptainer reference guide