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:
@@ -13,7 +13,8 @@ if /i "%INSTALL_CUDA%"=="y" (
|
|||||||
echo Installing PyTorch with CUDA 12.1 support...
|
echo Installing PyTorch with CUDA 12.1 support...
|
||||||
|
|
||||||
REM Uninstall CPU-only version if present
|
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 Install CUDA-enabled PyTorch
|
||||||
REM This installs PyTorch with bundled CUDA runtime
|
REM This installs PyTorch with bundled CUDA runtime
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ if [[ $REPLY =~ ^[Yy]$ ]]
|
|||||||
then
|
then
|
||||||
echo "Installing PyTorch with CUDA 12.1 support..."
|
echo "Installing PyTorch with CUDA 12.1 support..."
|
||||||
# Uninstall CPU-only version if present
|
# 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
|
# Install CUDA-enabled PyTorch
|
||||||
# This installs PyTorch with bundled CUDA runtime
|
# This installs PyTorch with bundled CUDA runtime
|
||||||
|
|||||||
Reference in New Issue
Block a user