/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
Thecerebrium.toml configuration file controls which files become part of the app:
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 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):
-
Upload files with
cerebrium cp: -
List files with
cerebrium ls: -
Remove files with
cerebrium rm: -
Download files with
cerebrium download:
Using Stored Files
Access files in persistent storage at runtime:/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 withregion = "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:
/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.- Via Dashboard: Navigate to the project and select Volumes. Click the three-dot menu on the volume and select Increase Size.

- 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:
Using External Cloud Storage
Cerebrium does not mount external cloud storage buckets (S3, GCS, Azure Blob) as a filesystem. To read from or write to your own bucket, use the provider’s SDK inside your app code and authenticate with credentials stored as secrets.-
Add the SDK to your
cerebrium.toml: -
Store your credentials as project or app secrets (for example
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION). Secrets are exposed as environment variables at runtime. -
Access the bucket from your handler:
/persistent-storage so subsequent container starts read from the local volume instead of the bucket. The same pattern applies to Google Cloud Storage (google-cloud-storage) and Azure Blob Storage (azure-storage-blob).
Storage Quota Errors
If you hit your storage quota, you’ll see errors likeNo space left on device when trying to download or write files. To resolve this:
- Remove unnecessary files from
/persistent-storageusingcerebrium rm - Resize the volume to a larger capacity (up to 1TB self-service)
- Contact support for storage beyond 1TB