Global volumes for Serverless are in beta. Features and behavior may change before general availability.
Mount path
Inside a worker, a global volume mounts at/runpod-volume, the same path used for network volumes on Serverless. Read your model files and other assets from this path in your handler function.
Attach a global volume to an endpoint
You attach a global volume when you create a new endpoint or edit an existing one. To attach a global volume to a new endpoint:- Go to Serverless and click + New Endpoint.
- Configure your endpoint, then expand Advanced.
- Under Global volume, select the volume you want to attach.
- Click Deploy.
- Go to Serverless and select your endpoint.
- Click Manage, then Edit Endpoint.
- Expand Advanced and select the global volume you want to attach.
- Click Save Endpoint.
Attaching a volume doesn’t copy any existing data, so upload your model files and other assets to the global volume before you attach it. Changing the attached volume triggers a new release and your workers redeploy to pick it up.
Attach a global volume with the REST API
You can also attach and detach an endpoint’s global volume through the Runpod REST API v2. The endpoint create, update, and read operations accept aglobalVolumes field: an array of volume IDs that holds at most one volume. It mirrors the existing networkVolumes field.
The API doesn’t expose a route for listing global volumes yet, so copy the volume ID from the Storage page in the console before you make a request.
globalVolumes in the request body:
/v2/serverless/{id}. The globalVolumes field follows the same rules as networkVolumes:
- Omit the field to keep the current volume attached.
- Set it to
["<global-volume-id>"]to attach or replace the volume. - Set it to
[]to detach the volume.
Limitations
- One global volume per endpoint: An endpoint can attach at most one global volume at a time.
- Mutually exclusive with network volumes: An endpoint can’t use a global volume and a network volume at the same time.