Mounting provides direct access to network file systems (e.g., AWS EFS or GCP Filestore) without the need to download files.
Valohai does not version or track changes made inside the mounted file system. Files created, edited, or deleted are not versioned in Valohai executions.
You can mount a filesystem to access a large dataset, perform preprocessing, and save the processed dataset in Valohai Outputs. This ensures that a snapshot of the preprocessed data is versioned.
NFS mounts are not version-controlled.
We strongly recommend using Valohai’s inputs and outputs system, which versions data as part of the execution process.
valohai.yaml
Mount points are defined in valohai.yaml
:
- step:
name: mount-sample
image: python:3.11
command:
- ls -la /images
mounts:
- destination: /images
source: /mnt/data/images
REST API
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.11",
"mounts": [
"/mnt/data/images:/images"
]
}
The information about the mount is not currently preserved in the execution details when launched from an API. This means that copying the execution from the Valohai web app does not include the mounting when the execution has been started with an REST API call.