File Sync
Synchronize files to run your workload.
Users have the following options for submitting their application code as a Trainy workload.
- (Re)building a docker image for every change and pushing it to a registry for launching a workload.
- Committing changes to a development branch in git and checking it out in the workload
- Synchronizing application code through file sync via
file_mounts
andworkdir
definitions.
The first option is often slow given the size of deep learning images so we focus on the the latter two here.
Setup
We first need to decide which storage provider we are going to use. First, we have to place our cloud service account credentials into the Trainy cluster.
afterwards we configure the storage provider by setting ~/.konduktor/config.yaml
Usage
When we run konduktor launch
two things happen atomically in this order. If any step fails, the workload will fast-fail.
workdir
andfile_mounts
are synchronized to object storage- workload is submitted
- workload, once active, will sync down
workdir
andfile_mounts
In our workload definition, we can define the following:
Cloning private GitHub Repositories.
Currently, cloning private repositories is _only supported via file sync of ssh keys to your object store. _In the following example, we sync an ssh key from our workstation onto the workload and configure SSH for pulling from a private repository.