/data is the volume. Files written there survive calls,
instances and redeploys, and any other deployment mounting training-data sees
the same files.
The mental model
A volume is shared files, not a database. Reads and writes are ordinary filesystem operations, which has two consequences worth knowing up front:- Concurrent writes to the same file are last write wins. There is no locking. Give concurrent writers distinct paths, such as one file per user or per run, and the problem disappears.
- A file written by one deployment becomes visible to others within seconds, not instantly.
Creating and attaching
Referencing a volume creates it. The first deploy that mentionstraining-data
brings it into existence and says so in the deploy output, so a typo shows up as
a new volume rather than a silent empty one. To be explicit first:
volumes= maps mount paths to volumes on any decorator:
The workspace convention
/workspace is where apps and agents keep state: chats, per-user files,
credentials and the key-value store. Agents require a volume there and the
decorator raises without one. Apps need one only if they use workspace or DB.
cycls run ignores volumes. Locally your code sees the local filesystem, which
keeps the development loop fast and offline.Moving data in and out
The CLI talks to storage directly, so transfers do not proxy through the API and file size is effectively unlimited.Sharing across deployments
Attachment is by name, so a family of deployments can work on one dataset.Lifecycle
cycls rm <deployment>detaches volumes and leaves the data alone. Redeploying the same name reattaches them with files intact.cycls volume delete <name>is the only way to delete data. It refuses while any deployment has the volume attached, and names them in the error.- Deleted volumes stay recoverable for seven days.
Structured state on a volume
For per-user JSON rather than files,cycls.DB is a small key-value store that
writes to the workspace volume.
Next
Cron
Fire a deployed function on a schedule.