original_docstring: Build the command line arguments to execute the requested command.
  
      Args:
        args: A list of string positional arguments to pass to the docker image.
        flags: A map of flag arguments. The keys are prefixed with '--' and
          concatenated with the keys to produce arguments. E.g. {"foo": 2}
          equates to ["--foo", "2"].
        volumes: A map of shared volumes, e.g. {"/tmp": "/foo"} equates to
          the argument "-v/tmp:/foo". It is the responsibility of the calling
          code to ensure that the host paths are accessible to docker, and have
          the appropriate permissions for the docker user to access / modify. See
          //labm8/py:dockerutil_test for an example.
        timeout: The number of seconds to allow the image to run for before being
          killed. Killed processes will exit with returncode 9.
        entrypoint: An optional entrypoint for the docker image, equivalent to
          ["--entrypoint", entrypoint].
  
      Returns:
        The command line as a list of strings.
      
docstring: Build the command line arguments to execute the requested command.
docstring_tokens: Build the command line arguments to execute the requested command .
code: def _CommandLineInvocation(
      self,
      args: typing.List[str],
      flags: typing.Dict[str, str],
      volumes: typing.Dict[typing.Union[str, pathlib.Path], str],
      timeout: int,
      entrypoint: typing.Optional[str],
    ) -> typing.List[str]:
      """Build the command line arguments to execute the requested command.
  
      Args:
        args: A list of string positional arguments to pass to the docker image.
        flags: A map of flag arguments. The keys are prefixed with '--' and
          concatenated with the keys to produce arguments. E.g. {"foo": 2}
          equates to ["--foo", "2"].
        volumes: A map of shared volumes, e.g. {"/tmp": "/foo"} equates to
          the argument "-v/tmp:/foo". It is the responsibility of the calling
          code to ensure that the host paths are accessible to docker, and have
          the appropriate permissions for the docker user to access / modify. See
          //labm8/py:dockerutil_test for an example.
        timeout: The number of seconds to allow the image to run for before being
          killed. Killed processes will exit with returncode 9.
        entrypoint: An optional entrypoint for the docker image, equivalent to
          ["--entrypoint", entrypoint].
  
      Returns:
        The command line as a list of strings.
      """
      entrypoint_args = ["--entrypoint", entrypoint] if entrypoint else []
      volume_args = [f"-v{src}:{dst}" for src, dst in (volumes or {}).items()]
      flags_args = labtypes.flatten(
        [[f"--{k}", str(v)] for k, v in (flags or {}).items()],
      )
      return _Docker(
        ["run", "--rm"]
        + entrypoint_args
        + volume_args
        + [self.image_name]
        + args
        + flags_args,
        timeout,
      )
code_tokens: def _CommandLineInvocation ( self , args : typing . List [ str ] , flags : typing . Dict [ str , str ] , volumes : typing . Dict [ typing . Union [ str , pathlib . Path ] , str ] , timeout : int , entrypoint : typing . Optional [ str ] , ) -> typing . List [ str ] : entrypoint_args = [ "--entrypoint" , entrypoint ] if entrypoint else [ ] volume_args = [ f"-v{src}:{dst}" for src , dst in ( volumes or { } ) . items ( ) ] flags_args = labtypes . flatten ( [ [ f"--{k}" , str ( v ) ] for k , v in ( flags or { } ) . items ( ) ] , ) return _Docker ( [ "run" , "--rm" ] + entrypoint_args + volume_args + [ self . image_name ] + args + flags_args , timeout , )
short_docstring: Build the command line arguments to execute the requested command.
short_docstring_tokens: Build the command line arguments to execute the requested command .
comment: """Build the command line arguments to execute the requested command.
  
      Args:
        args: A list of string positional arguments to pass to the docker image.
        flags: A map of flag arguments. The keys are prefixed with '--' and
          concatenated with the keys to produce arguments. E.g. {"foo": 2}
          equates to ["--foo", "2"].
        volumes: A map of shared volumes, e.g. {"/tmp": "/foo"} equates to
          the argument "-v/tmp:/foo". It is the responsibility of the calling
          code to ensure that the host paths are accessible to docker, and have
          the appropriate permissions for the docker user to access / modify. See
          //labm8/py:dockerutil_test for an example.
        timeout: The number of seconds to allow the image to run for before being
          killed. Killed processes will exit with returncode 9.
        entrypoint: An optional entrypoint for the docker image, equivalent to
          ["--entrypoint", entrypoint].
  
      Returns:
        The command line as a list of strings.
      """