When developing a workflow, it’s helpful to run the task functions before executing the entire workflow in the cloud to debug the environment and logical issues. Since tasks run in a different environment than your local computer (namely, the one defined in your Dockerfile(s)), there may be discrepancies when running your code locally.To address this, the Latch SDK comes with a command that allows you to run tasks and debug your environment without having to reregister your workflow and run it through the UI.
latch develop
, make sure to register your workflow to Latch with latch register <path_to_workflow_directory>
beforehand.
latch develop
like so:
rsync
to bring changes from your local workflow directory to the latch develop environment. We recursively copy changes to the /root
directory in the development environment. For example, this line in the default docker image creates the wf
directory in the cloud environment:
latch develop
, any changes to files or additional files created in the wf
directory will be reflected in the environment, overwriting the old code in the development environment to ensure that your latest changes are present.
Files deleted locally are not automatically deleted in the development environment. Also, any changes to the Dockerfile that you would like to reflect in the development environment require a reregister.
latch
versions 2.59.0
and later.
In the case that you need to debug against a specific GPU, you may customize which instance the develop
container runs on, using the --instance-size
flag. For example,
develop
container on an instance with a single NVIDIA T4 GPU.
The following instance sizes are currently supported:
small_task
- 2 cores, 4 GiB RAM, no GPUmedium_task
- 30 cores, 100 GiB RAM, no GPUsmall_gpu_task
- 7 cores, 30 GiB RAM, 1x NVIDIA T4large_gpu_task
- 63 cores, 245 GiB RAM, 1x NVIDIA A10Gv100_x1_task
- 7 cores, 48 GiB RAM, 1x NVIDIA V100g6e_xlarge_task
- 4 cores, 32 GiB RAM, 1x NVIDIA L40S