srunx.containers package#
Submodules#
srunx.containers.apptainer module#
Apptainer / Singularity container runtime backend.
Generates apptainer exec (or singularity exec) as a launch_prefix that wraps the user command.
srunx.containers.base module#
Base abstractions for container runtime backends.
- class srunx.containers.base.LaunchSpec(prelude='', srun_args='', launch_prefix='')[source]#
Bases:
objectRuntime-agnostic container launch specification.
Three distinct outputs model different injection points in generated scripts: - prelude: Shell setup lines executed before the command (e.g., declare arrays) - srun_args: Flags passed to srun itself (Pyxis uses this) - launch_prefix: Command wrapper prepended to the user command (Apptainer uses this)
-
prelude:
str= ''#
-
srun_args:
str= ''#
-
launch_prefix:
str= ''#
- __init__(prelude='', srun_args='', launch_prefix='')#
-
prelude:
srunx.containers.pyxis module#
Pyxis container runtime backend.
Generates NVIDIA Pyxis –container-* flags as srun arguments, reproducing the existing behavior that was previously hardcoded in _build_environment_setup().
Module contents#
Container runtime abstraction for srunx.
- class srunx.containers.ContainerRuntime(*args, **kwargs)[source]#
Bases:
ProtocolProtocol for container runtime backends.
- __init__(*args, **kwargs)#
- class srunx.containers.LaunchSpec(prelude='', srun_args='', launch_prefix='')[source]#
Bases:
objectRuntime-agnostic container launch specification.
Three distinct outputs model different injection points in generated scripts: - prelude: Shell setup lines executed before the command (e.g., declare arrays) - srun_args: Flags passed to srun itself (Pyxis uses this) - launch_prefix: Command wrapper prepended to the user command (Apptainer uses this)
- __init__(prelude='', srun_args='', launch_prefix='')#
-
launch_prefix:
str= ''#
-
prelude:
str= ''#
-
srun_args:
str= ''#
- class srunx.containers.PyxisRuntime[source]#
Bases:
objectPyxis runtime backend – generates –container-* srun flags.
- class srunx.containers.ApptainerRuntime(binary='apptainer')[source]#
Bases:
objectApptainer/Singularity runtime backend – generates launch_prefix.