Mounting gives you direct access to the network file system like AWS EFS or GCP Filestore, without having to download the files on your machine.
Valohai does not version or keep track of the changes made inside the mounted file system. The files that are created, edited, or deleted will not be versioned as part of a Valohai execution.
We strongly recommend using the Valohai inputs and outputs system, as they are versioned as a part of the execution.
You can mount a filesystem to access a large dataset, run preprocessing operations, and output the processed dataset into Valohai Outputs before it’s used further in the pipeline. This way the snapshot of the preprocessed data will be versioned.
Define a mount in YAML
- step:
name: mount-sample
image: python:3.8
command:
- ls -la /my-data
mounts:
- destination: /my-data
source: /path/to/directory/outside/container
Define a mount in an API call
You can define mounts when starting executions with an API call. You do not need to define the mount in the valohai.yaml in this case.
{
"project": "<project-id>",
"commit": "<commit>",
"step": "mount-sample",
"command": "ls /mydata",
"image": "python:3.8",
"mounts": ["/mnt/point:/mydata"]
}
Comments
0 comments
Please sign in to leave a comment.