apptainer Verified current stable Not installed? Containers

Apptainer / Run Runscript With Arguments

Run Runscript With Arguments

Execute a script within an Apptainer image, passing specified arguments for customized behavior.

$
Terminal
apptainer run <path/to/image.sif> <arg1 arg2 ...>

When To Use

Use this command to run a script inside an Apptainer container with specific arguments.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
apptainer run <path/to/image.sif> <arg1 arg2 ...>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Running script with arguments:
Argument 1: value1
Argument 2: value2
Script executed successfully.

Command Breakdown

What each part is doing

apptainer
Base Command
The executable that performs this operation. Here it runs Apptainer before the shell applies any redirect operators.
<path/to/image.sif>
path to image.sif
The value supplied for path to image.sif.
<arg1 arg2 ...>
arg1 arg2 ...
The value supplied for arg1 arg2 ....

How To Run

Execution path

  1. Step 1

    Replace {{path/to/image.sif}} with your Apptainer image path.

  2. Step 2

    List your arguments in place of {{arg1 arg2 ...}}.

  3. Step 3

    Run the command to execute the script with the provided arguments.

Alternative Approaches

Comparable commands in other tools

Alternative containers tools for the same job.