Skip to content

The open-source AI voice studio. Clone, dictate, create.

fix: harden GPU release pipeline with platform guard and credential scoping

Mike Keyd4285b2e3d76
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a0ceff79..e09c93ef 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -369,6 +369,8 @@ jobs:
steps:
- uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Free up disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
@@ -380,7 +382,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.12"
- cache: "pip"
- name: Install GPU PyTorch (Linux) first so requirements see it satisfied
# The Linux GPU runtime ships inside the torch wheels (for ROCm:
diff --git a/backend/services/cuda.py b/backend/services/cuda.py
index 747d898a..41453389 100644
--- a/backend/services/cuda.py
+++ b/backend/services/cuda.py
@@ -23,7 +23,7 @@ from typing import Optional
from .. import __version__
from ..config import get_data_dir
-from ..utils.platform_detect import server_asset_platform
+from ..utils.platform_detect import SUPPORTED_GPU_ASSET_PLATFORMS, server_asset_platform
from ..utils.progress import get_progress_manager
logger = logging.getLogger(__name__)
@@ -314,6 +314,11 @@ async def _download_cuda_binary_locked(version: Optional[str] = None):
base_url = f"{GITHUB_RELEASES_URL}/{version}"
plat = server_asset_platform()
+ if plat not in SUPPORTED_GPU_ASSET_PLATFORMS:
+ raise RuntimeError(
+ f"CUDA backend not available for platform '{plat}'. "
+ f"Supported platforms: {', '.join(SUPPORTED_GPU_ASSET_PLATFORMS)}"
+ )
server_archive = f"voicebox-server-cuda-{plat}.tar.gz"
libs_archive = f"cuda-libs-{plat}-{CUDA_LIBS_VERSION}.tar.gz"