Skip to main content
Flash is now part of the Runpod SDK. This page documents the standalone runpod-flash package, which keeps working but no longer gets new features. For new projects, use the Runpod SDK. To see how Flash commands and imports map to the SDK, see Migrating from Flash.
Flash workers have access to two types of storage: for temporary data and for persistent, sharable data.

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 the template parameter (default: 64GB).

CPU auto-sizing

CPU endpoints automatically adjust container disk size based on instance limits:
  • CPU3G and CPU3C instances: vCPU count × 10GB (e.g., 2 vCPU = 20GB)
  • CPU5C instances: vCPU count × 15GB (e.g., 4 vCPU = 60GB)
If you specify a custom size that exceeds the instance limit, deployment will fail with a validation error.

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 the volume 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:
The 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):
Only one network volume is allowed per datacenter. If you specify multiple volumes in the same datacenter, deployment will fail.

Accessing network volume files

Network volumes mount at /runpod-volume/ and can be accessed like a regular filesystem:

Load large models from local disk

If your model is on Hugging Face and your endpoint uses a GPU, try cached models first. They need no network volume or cache code, and you aren’t billed for the download. Set HF_HUB_CACHE to /runpod-volume/huggingface-cache/hub on the endpoint, then attach the model after flash deploy with runpodctl serverless update <endpoint-id> --model-reference https://huggingface.co/<org>/<model>:main. Later deploys keep the reference. Workers wait to start until a host has the model, so compare the whole cold request, including queue time, before you choose between cached models and the volume approach below.
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.

Load-balanced endpoints with storage

Creating and managing network volumes

Network volumes must be created before attaching them to an Endpoint. See Network volumes for detailed instructions.
Last modified on October 16, 2026