aws-cli
and unzip
APT packages, then use the pyyaml
python package to read the included metadata.
The workflow environment is encapsulated in a Docker container, which is created from a recipe defined in a Dockerfile.
Latch provides automatic Dockerfile generation via the latch dockerfile
command. You can pass a set of requirements files (detailed below) to this command to configure the generated Dockerfile to install specific dependencies in the environment.
requirements.txt
requirements.txt
file can be automatically installed using pip
. In order to enable this, pass the path to your requirements.txt
file to the latch dockerfile
command using the -p/--pip-requirements
option.
requirements.txt
Command
Generated Docker Commands
setup.py
, PEP-621 pyproject.toml
setup.py
file or a PEP-621 compliant pyproject.toml
file can be automatically installed using pip
. Pass the path to either the setup.py
or the pyproject.toml
using the -i/--pyproject
option.
Poetry pyproject.toml
files are not supported.
setup.py
Command
Generated Docker Commands
environment.yaml
environment.yaml
file can be automatically installed using mamba env create --file
with latest mamba installed via Miniforge. This environment will be used by default.
To enable, pass the path to the environment file using the -c/--conda-env
option.
Example File
Generated Docker Commands
environment.R
environment.R
file can be automatically executed when the Dockerfile is built. This is intended for installing dependencies but there are no actual limits on what the script does. The script is executed using rig
. By default, this uses the latest R
version, though you can change this by editing the run rig add release
line (shown below).
To enable this, pass in the path to the R file using the -r/--r-env
flag.
Note that some R packages may have system dependencies that need to be installed using APT or another method. These packages will list these dependencies in their documentation. Missing dependencies will cause crashes during workflow build or when using the packages.
environment.R
Command
Generated Docker Commands
apt
dependencies can also be installed by default. Each line of the file must contain an apt package (with format consistent with what is specified here). This can be enabled by passing the path to the file with the -a/--apt-requirements
option.
system-requirements.txt
Command
Generated Docker Commands
-d/--direnv
option.
.env
Command
Generated Docker Commands
subprocess
template (using latch init --template subprocess --dockerfile example_workflow
):
conda
setup.py
/ pyproject.toml
requirements.txt
requirements.txt
file will overwrite a previous install of the same packaged installed by the conda
environment.
.dockerignore
. Files can be specified one at a time or using glob patterns.
The default .dockerignore
includes files auto-generated by Latch.
small-gpu-task
, large-gpu-task
, v100_x*_task
, and g6e_*_task
). This includes mount
and chroot
among others.