Managing Files
Cerebrium offers file management through a 50GB 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. You’ll need to 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.
-
Upload files with
cerebrium cp
: -
List files with
cerebrium ls
: -
Remove files with
cerebrium rm
: -
Download files with
cerebrium download
:
Using Stored Files
Here’s how to work with files in persistent storage:
During runtime on Cerebrium, your application should access files using the full /persistent-storage/
path. For example:
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.
Should you require additional storage capacity, please reach out to us through support.