Environments for Individual Tasks
Different tasks in a workflow may need different sets of dependencies. Creating a single shared environment can be problematic as the some part of the workflow image will be unused in each task and slow down that task’s startup proportionally to the size of the extraneous chunk. Different dependencies might also need different system package versions in which case installing them together might be impractical.
Instead, consider defining an individual environment for each task using the optional dockerfile
parameter in the task definition. Include only the dependencies that each specific task needs.
The value passed to dockerfile
must be str
literal (meaning no variables or expressions, just a value). If the path is relative, it will be resolved against the package root.
Dockerfile
s can be organized as follows:
The root directory used when building the images is always the workflow directory.
Limitations
latch develop
uses the Dockerfile
in the workflow directory and not any of the individual Dockerfiles
Was this page helpful?