Container disk
A container disk provides temporary storage that exists only while a worker is running. Each worker gets its own isolated container disk, with a default size of 64GB for GPU endpoints. You can read and write temporary files to the container disk using standard filesystem operations from within@Endpoint functions.
Any file that is not written to a network volume (at /runpod-volume/) is written to the container disk, and will be erased when the worker stops.
Configuring container disk size (GPU-only)
Configure container disk size for GPU endpoints using thetemplate parameter (default: 64GB).
CPU auto-sizing
CPU endpoints automatically adjust container disk size based on instance limits:CPU3GandCPU3Cinstances: vCPU count × 10GB (e.g., 2 vCPU = 20GB)CPU5Cinstances: vCPU count × 15GB (e.g., 4 vCPU = 60GB)
Network volumes
Network volumes provide persistent storage that survives worker restarts. Each volume is tied to a specific datacenter. Use volumes to share data between endpoint functions or to persist data between runs.Attaching network volumes
Attach a network volume using thevolume parameter. Flash uses the volume name to find an existing volume or create a new one. Specify the datacenter parameter to control where the volume is created:
size parameter specifies the volume size in GB. Valid values range from 10 to 4096 GB (4 TB). If not specified, size defaults to 100 GB.
You can also reference an existing volume by ID:
Multi-datacenter volumes
For endpoints deployed across multiple datacenters, pass a list of volumes (one per datacenter):Accessing network volume files
Network volumes mount at/runpod-volume/ and can be accessed like a regular filesystem:
Load large models from local disk
Reading model weights straight from/runpod-volume/ reads them over the network on every cold start. To load from local disk instead, keep the Hugging Face cache on the container disk and wrap the model load in VolumeCache from the Runpod Python SDK. VolumeCache keeps a mirror of the cache directory on the network volume. When a worker starts, it copies the mirror onto the container disk, and after the load it syncs any newly downloaded files back. The first worker downloads the model from Hugging Face, and later cold starts restore it from the volume.
VolumeCache requires runpod 1.12.0 or later. It never fails a job: if any part of the cache fails, the worker logs the error and falls back to a normal cold start, so pass best_effort=False while you set it up. VolumeCache doesn’t copy symbolic links, which the Hugging Face cache uses for its snapshots/ directory, so keep Hugging Face Hub access enabled and let from_pretrained re-link the snapshot on each cold start. Don’t set HF_HUB_OFFLINE=1 on a cache that VolumeCache restores. Size the volume to hold the mirror, which lives under /runpod-volume/.cache/. Size the container disk for the whole model plus headroom too, because the restore and any fallback download both write there. The container disk defaults to 64 GB, so for larger models set template=PodTemplate(containerDiskInGb=...) on the endpoint.