You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(build): per-app python_version with cross-resource validation (#322)
* feat(build): per-app python_version with cross-resource validation (AE-2827)
Expand GPU and CPU worker images to support Python 3.10, 3.11, and 3.12.
Flash apps ship as one tarball so every resource must share a Python
version; the build step now reconciles per-resource python_version
declarations into a single app-level value or accepts an explicit
--python-version override.
- constants.py: expand GPU_PYTHON_VERSIONS / CPU_PYTHON_VERSIONS tuples
- manifest.py: add _reconcile_python_version; stamp target_python_version
on every resource; raise on conflicting declarations
- build.py / deploy.py: add --python-version CLI flag, thread through
run_build and ManifestBuilder
- docs: document per-app python_version, cold-start tradeoff for non-3.12
GPU images, and the 3.10 EOL window
- tests/unit/test_dotenv_loading.py: add preserve_runpod_flash_modules
fixture so module-deletion tests don't leak stale module references
into sibling test files (unblocks deterministic test ordering)
* refactor(manifest): drop dead python_version assignment in __init__
The effective app-level Python version is assigned by build() via
_reconcile_python_version(). Pre-build access always saw a value that
build() would overwrite — misleading and never read. Initialize to None
so readers fail fast if they touch the attribute before build().
* docs(flash-build): drop stale --keep-build and --preview refs
Neither flag is exposed by flash/cli/commands/build.py::build_command;
--preview now lives on flash deploy. Aligns the docs with actual CLI
behavior — build directory is always retained on success, so the
--keep-build toggle is gone.
Caught by Copilot review on PR #322.
Copy file name to clipboardExpand all lines: docs/Flash_Deploy_Guide.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,23 @@ This guide walks through deploying a Flash application from local development to
6
6
7
7
## Prerequisites
8
8
9
-
- Python 3.10+
9
+
- Python 3.10, 3.11, or 3.12
10
10
-`pip install runpod-flash`
11
11
- A Runpod account with API key ([get one here](https://docs.runpod.io/get-started/api-keys))
12
12
13
+
### Python version selection
14
+
15
+
Flash apps ship as a single tarball, so every resource in an app shares one Python version. The worker runtime defaults to 3.12 (the version torch is pre-installed for in the GPU base image). Select a different version in two ways:
16
+
17
+
-**Per-resource declaration**: set `python_version="3.11"` on any resource config — all resources in the same app must agree or leave it unset.
18
+
-**App-level override**: pass `--python-version 3.11` to `flash build` or `flash deploy`. The override wins over per-resource values that are unset and must match any that are set.
19
+
20
+
| Version | Status | GPU cold-start | Notes |
21
+
|---------|--------|----------------|-------|
22
+
| 3.10 | Supported (EOL 2026-10-31) | +~7 GB alt-Python install | Consider migrating to 3.11 before EOL |
23
+
| 3.11 | Supported | +~7 GB alt-Python install ||
24
+
| 3.12 | Supported (default) | No overhead | Torch pre-installed in base image |
0 commit comments