datalad_container.containers_run

Drop-in replacement for datalad run for command execution in a container

class datalad_container.containers_run.ContainersRun[source]

Bases: Interface

Drop-in replacement of 'run' to perform containerized command execution

Container(s) need to be configured beforehand (see containers-add). If no container is specified and only one container is configured in the current dataset, it will be selected automatically. If more than one container is registered in the current dataset or to access containers from subdatasets, the container has to be specified.

A command is generated based on the input arguments such that the container image itself will be recorded as an input dependency of the command execution in the run record in the git history.

During execution the environment variable {name_envvar} is set to the name of the used container.

on_failure = 'stop'