latch_cli.docker_utils package#
Module contents#
- class latch_cli.docker_utils.DockerCmdBlockOrder(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
Put a command block before or after the primary COPY command.
- precopy = '1'#
- postcopy = '2'#
- class latch_cli.docker_utils.DockerCmdBlock(comment: str, commands: List[str], order: latch_cli.docker_utils.DockerCmdBlockOrder)[source]#
Bases:
object
- order: DockerCmdBlockOrder#
- latch_cli.docker_utils.get_prologue(config: LatchWorkflowConfig, wf_type: WorkflowType = WorkflowType.latchbiosdk) List[str] [source]#
- latch_cli.docker_utils.get_epilogue(wf_type: WorkflowType = WorkflowType.latchbiosdk) List[str] [source]#
- latch_cli.docker_utils.infer_commands(pkg_root: Path) List[DockerCmdBlock] [source]#
- latch_cli.docker_utils.generate_dockerfile(pkg_root: Path, outfile: Path, *, wf_type: WorkflowType = WorkflowType.latchbiosdk) None [source]#
Generate a best effort Dockerfile from files in the workflow directory.
- Parameters:
pkg_root – A path to a workflow directory.
outfile – The path to write the generated Dockerfile.
wf_type – The type of workflow (eg. snakemake) the Dockerfile is for
Example
>>> generate_dockerfile(Path("test-workflow"), Path("test-workflow/Dockerfile")) # The resulting file structure will look like # test-workflow # ├── Dockerfile # └── ...
- latch_cli.docker_utils.get_default_dockerfile(pkg_root: Path, *, wf_type: WorkflowType)[source]#