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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user