From e0c82416075472bec685f3aceacdc426ba3f22a4 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 26 Dec 2025 11:43:46 -0800 Subject: [PATCH] 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 --- build-cuda.bat | 3 ++- build-cuda.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build-cuda.bat b/build-cuda.bat index bfbf6f5..4805aff 100644 --- a/build-cuda.bat +++ b/build-cuda.bat @@ -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 diff --git a/build-cuda.sh b/build-cuda.sh index 5d2719f..fb1fc7f 100755 --- a/build-cuda.sh +++ b/build-cuda.sh @@ -15,7 +15,8 @@ if [[ $REPLY =~ ^[Yy]$ ]] then echo "Installing PyTorch with CUDA 12.1 support..." # Uninstall CPU-only version if present - uv pip uninstall -y torch + # Note: uv doesn't support -y flag, it uninstalls without confirmation + uv pip uninstall torch 2>/dev/null || true # Install CUDA-enabled PyTorch # This installs PyTorch with bundled CUDA runtime