Syncing datasets across clusters
cluv sync can also replicate datasets to every cluster listed in your Cluv config.
1) Configure dataset sync in pyproject.toml
Add data_source and datasets_path under [tool.cluv]:
[tool.cluv]
# Source cluster and source path (`hostname:/path`).
data_source = "mila:/network/datasets/cifar10.var/cifar10_torchvision"
# Destination path used on each cluster (can use env vars like $SCRATCH).
datasets_path = "$SCRATCH/datasets/cifar10"
data_sourceis where Cluv pulls the dataset from.datasets_pathis where Cluv stores it on each cluster.
You can override datasets_path per cluster:
2) Login to clusters (including the source)
Before syncing, create reusable SSH connections:
If your source is mila:..., make sure the mila connection exists (for example cluv login mila).
3) Run sync
With dataset sync enabled (default), Cluv will:
- Pull data from
data_sourceto your local/current clusterdatasets_path. - Push that dataset to each target cluster at its configured
datasets_path.