ContainerizedCode
: Add support for running codes within Docker containers
#5818
Labels
Milestone
ContainerizedCode
: Add support for running codes within Docker containers
#5818
Currently the
ContainerizedCode
implementation supports certain container technologies, such as Singularity and Sarus. These are technologies that are often employed by high-performance computing centers, but users will typically not be familiar with running this on their workstations. Docker is a more common option, but is not yet supported. Providing support for Docker would make a huge step in increasing the provenance of AiiDA even more, as now the compute environment ofCalcJob
s is not stored at all.At least for the most minimal use case, one single change should be sufficient to enable Docker support. The way a command within a docker container should be invoked is as follows:
The most important part is that the executable, command line arguments and the redirection of file streams (stdin, stderr and stdout) should all be wrapped in double quotes to form a single argument to the
sh -c
invocation.It is not possible to do this with the current API provided by
aiida-core
. A solution had already been proposed by @unkcpz in #5507 by adding another attribute to theContainerizedCode
calledescape_exec_line
which would beFalse
by default. When set toTrue
it would instructScheduler
plugins to wrap all arguments after the computer command line arguments in double quotes.The text was updated successfully, but these errors were encountered: