Fix CUDA build scripts: Remove unsupported -y flag from uv pip uninstall

- uv pip uninstall doesn't support the -y flag (auto-confirm)
- uv uninstalls without confirmation by default
- Suppressed error output if torch not installed (2>/dev/null on Linux, 2>nul on Windows)
- Added || true on Linux to prevent script exit if torch not found

Fixes: error: unexpected argument '-y' found in CUDA build scripts
This commit is contained in:
2025-12-26 11:43:46 -08:00
parent 6ec350af69
commit e0c8241607
2 changed files with 4 additions and 2 deletions

View File

@@ -13,7 +13,8 @@ if /i "%INSTALL_CUDA%"=="y" (
echo Installing PyTorch with CUDA 12.1 support...
REM Uninstall CPU-only version if present
uv pip uninstall -y torch
REM Note: uv doesn't support -y flag, it uninstalls without confirmation
uv pip uninstall torch 2>nul
REM Install CUDA-enabled PyTorch
REM This installs PyTorch with bundled CUDA runtime