Skip to content

docs: Document Serverless network-volume warm cache (VolumeCache)#693

Draft
promptless[bot] wants to merge 1 commit into
mainfrom
promptless/serverless-volume-cache
Draft

docs: Document Serverless network-volume warm cache (VolumeCache)#693
promptless[bot] wants to merge 1 commit into
mainfrom
promptless/serverless-volume-cache

Conversation

@promptless

@promptless promptless Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Adds a new Serverless page documenting the runpod-python volume cache introduced in runpod/runpod-python#531 (SLS-367): its built-in auto-hydrate/sync behavior, env-var configuration (RUNPOD_VOLUME_CACHE, RUNPOD_VOLUME_CACHE_MAX_GB, RUNPOD_CACHE_DIRS), the public VolumeCache class and warm() context manager, and its limitations. Adds the page to the nav and the optimization checklist. The source PR is still open (not merged), so some behavior (notably default-on vs opt-in) may change before release.

Trigger Events


Tip: Filter the Dashboard by labels or assignees to focus on what matters to you 🔎

Add a new page documenting the runpod-python volume cache: its
built-in auto-hydrate/sync behavior, env-var configuration
(RUNPOD_VOLUME_CACHE, RUNPOD_VOLUME_CACHE_MAX_GB, RUNPOD_CACHE_DIRS),
the VolumeCache class and warm() context manager, and limitations.
Wire it into the nav and the optimization checklist.

Source: runpod/runpod-python#531 (SLS-367)

| Variable | Default | Description |
|----------|---------|-------------|
| `RUNPOD_VOLUME_CACHE` | Enabled | Controls whether the built-in volume cache runs. Set to `0`, `false`, or `no` to turn it off. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Env-var names, defaults, and gating come from runpod/serverless/utils/rp_volume_cache.py in PR #531: RUNPOD_VOLUME_CACHE defaults on (disabled only for 0/false/no), RUNPOD_VOLUME_CACHE_MAX_GB defaults to 50, and RUNPOD_CACHE_DIRS is split on os.pathsep (: on Linux). Used to write the configuration table.

Source: https://github.com/runpod/runpod-python/pull/531/files


### Directories that are cached

By default, the volume cache targets the directories where Hugging Face and PyTorch store downloaded model weights:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auto-discovered cache directories (HF_HOME or ~/.cache/huggingface, plus HF_HUB_CACHE and TORCH_HOME when set) come from _discover_model_dirs() in rp_volume_cache.py. Used to write the "Directories that are cached" section.

Source: https://github.com/runpod/runpod-python/pull/531/files

`VolumeCache` accepts the following arguments:

| Argument | Default | Description |
|----------|---------|-------------|

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VolumeCache constructor signature and defaults (dirs, namespace defaulting to the endpoint ID, volume_path="/runpod-volume", max_size_gb=None, best_effort=True) and the public export runpod.serverless.VolumeCache come from rp_volume_cache.py and runpod/serverless/__init__.py in PR #531. Used to write the arguments table and code sample.

Source: https://github.com/runpod/runpod-python/pull/531/files

@mintlify

mintlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
runpod-docs 🟢 Ready View Preview Jul 7, 2026, 12:19 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants