Skip to main content
Cerebrium offers file management through a persistent volume that’s available to all apps in a project. This storage mounts at /persistent-storage and helps store model weights and files efficiently across deployments.
The /persistent-storage directory is not directly accessible during build time. Use the Cerebrium CLI commands or the mounted volume at runtime to manage these files.

Including Files in Deployments

The cerebrium.toml configuration file controls which files become part of the app:
Files included in deployments must be under 2GB each, with deployments working best for files under 1GB. Larger files should use persistent storage instead.

Managing Persistent Storage

The CLI provides four commands for working with persistent storage.
At runtime, the volume is mounted at /persistent-storage. When using these commands, the Cerebrium CLI does not display the /persistent-storage/ portion of the path.
Persistent storage is managed per region. Files written to /persistent-storage in one region are not guaranteed to be available in other regions; store data that must be available everywhere on global storage. File commands operate on the default region set by cerebrium region set (us-east-1 for new accounts). To target a different region for a single command, pass --region (or -r):
  1. Upload files with cerebrium cp:
  2. List files with cerebrium ls:
  3. Remove files with cerebrium rm:
  4. Download files with cerebrium download:

Using Stored Files

Access files in persistent storage at runtime:
Applications access files using the full /persistent-storage/ path at runtime:
Remember that while the CLI commands don’t display the /persistent-storage/ prefix in their output, your code must use the full path to access these files at runtime.

Global Storage

Apps deployed with region = "global" mount an additional volume at /global-persistent-storage. It is a single volume shared across every region the app runs in: files written there are visible from all regions, and reads are cached per region. See Multi-Region Deployment. Manage files on the global volume by passing --region global to the file commands:
Use the global volume for data that must be available everywhere, such as model weights for a global app. Use /persistent-storage for region-local data.
The global volume is 1TB. It does not appear in the dashboard Volumes list and cannot be resized.

Increasing Storage Capacity

Persistent volumes can be resized up to 1TB through self-service. Storage costs are listed on the pricing page.
  1. Via Dashboard: Navigate to the project and select Volumes. Click the three-dot menu on the volume and select Increase Size.
Volume resize option in the Cerebrium dashboard
  1. Via API: Use the resize volume endpoint. The volume ID is default-<region>. Sizes range from 50GB to 1TB, and shrinking a volume is not supported:
For storage needs beyond 1TB, contact support on Discord or via email.

Storage Quota Errors

If you hit your storage quota, you’ll see errors like No space left on device when trying to download or write files. To resolve this:
  1. Remove unnecessary files from /persistent-storage using cerebrium rm
  2. Resize the volume to a larger capacity (up to 1TB self-service)
  3. Contact support for storage beyond 1TB