=================== CWLDockerTranslator =================== StreamFlow relies on a ``CWLDockerTranslator`` object to convert a CWL `DockerRequirement `_ specification into a step binding on a given :ref:`Connector ` instance. By default, the :ref:`DockerCWLDockerTranslator ` is used to spawn a :ref:`DockerConnector `. However, StreamFlow also supports translators for :ref:`Kubernetes `, :ref:`Singularity ` and :ref:`NoContainer `. This latter allows to execute the step without a container, even if the ``DockerRequirement`` feature is defined. More ``CWLDockerTranslators`` can be implemented by the community using the :ref:`plugins ` mechanism (see :ref:`here `). The ``CWLDockerTranslator`` interface is defined in the ``streamflow.cwl.requirement.docker.translator`` module and exposes a single public method ``get_target``: .. code-block:: python def get_target( self, image: str, output_directory: str | None, network_access: bool, target: Target, ) -> Target: ... The ``get_target`` method returns a ``Target`` object that contains an auto-generated ``DeploymentConfig`` that reflects the ``CWLDockerTranslator`` configuration. The ``target`` parameter contains the original ``Target`` object of the related step. If the ``Connector`` created by the ``CWLDockerTranslator`` extends the :ref:`ConnectorWrapper ` class and the ``wrapper`` directive is defined as ``True`` in the StreamFlow file, the newly created ``Target`` object wraps the original one. The other parameters derive from the CWL workflow specification. In particular, the ``image`` parameter points to the Docker image needed by the step. The ``output_directory`` parameter reflects the ``dockerOutputDirectory`` option of a CWL ``DockerRequirement``. The ``network_access`` parameter derives from the CWL `NetworkAccess `_ requirement. Implementations =============== =================================================== ================================================================ Type Class =================================================== ================================================================ :ref:`docker ` streamflow.cwl.requirement.docker.DockerCWLDockerTranslator :ref:`kubernetes ` streamflow.cwl.requirement.docker.KubernetesCWLDockerTranslator :ref:`singularity ` streamflow.cwl.requirement.docker.SingularityCWLDockerTranslator =================================================== ================================================================