apptainer exec
linux
Execute a command within an Apptainer container. See also: `apptainer run`, `apptainer shell`.
More info →Options (3)
-B, --bindbooleanExecute a command with a bind mount from host to container
Example:
apptainer exec {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}} {{command}}-C, --containallbooleanExecute a command in fully isolated mode (contained filesystem, PID, IPC, and clean environment)
Example:
apptainer exec {{[-C|--containall]}} {{path/to/image.sif}} {{command}}-h, --helpbooleanDisplay help
Example:
apptainer exec {{[-h|--help]}}Examples (8)
Execute a command inside a container
apptainer exec path/to/image.sif commandExecute a command with arguments
apptainer exec path/to/image.sif command arg1 arg2 ...Execute a command with a bind mount from host to container
apptainer exec [-B|--bind] path/to/source:path/to/destination path/to/image.sif commandExecute a command with environment variables
apptainer exec --env variable=value path/to/image.sif commandExecute a command in fully isolated mode (contained filesystem, PID, IPC, and clean environment)
apptainer exec [-C|--containall] path/to/image.sif commandExecute a command with a writable temporary filesystem overlay
apptainer exec --writable-tmpfs path/to/image.sif commandExecute a command with NVIDIA GPU support
apptainer exec --nv path/to/image.sif commandDisplay help
apptainer exec [-h|--help]made by @shridhargupta | data from tldr-pages