Volume
Mounting Storage Volumes
Attach cloud storage volumes to your apps
Beam allows you to create highly-available storage volumes that can be used across tasks. You might use volumes for things like storing model weights or large datasets.
Mounting a Volume
Volumes can be attached to an App. By default, Volumes are shared across all apps in your Beam account.
from beam import function, Volume
VOLUME_PATH = "./model_weights"
@function(
volumes=[Volume(name="model-weights", mount_path=VOLUME_PATH)],
)
def load_model():
from transformers import AutoModel
# Load model from cloud storage cache
AutoModel.from_pretrained(VOLUME_PATH)
Browsing Volume Contents
You can list all your volumes through the web dashboard, or CLI using the beam volume list
command.
You can also browse all contents of a volume with the beam volume ls
command:
Deleting Volumes
You can delete a volume in the web dashboard. Click the three-dots icon next to a volume, and click Delete Volume
to permanently delete it.
![](https://mintlify.s3-us-west-1.amazonaws.com/slai-beam/img/deployment/delete-volume.png)
Was this page helpful?