cupy
This commit is contained in:
@@ -18,6 +18,28 @@ pip install -r requirements.txt
|
||||
echo "📹 Installing decord for video processing..."
|
||||
pip install decord
|
||||
|
||||
# Install CuPy for GPU acceleration of stereo validation
|
||||
echo "🚀 Installing CuPy for GPU acceleration..."
|
||||
# Auto-detect CUDA version and install appropriate CuPy
|
||||
python -c "
|
||||
import torch
|
||||
if torch.cuda.is_available():
|
||||
cuda_version = torch.version.cuda
|
||||
print(f'CUDA version detected: {cuda_version}')
|
||||
if cuda_version.startswith('11.'):
|
||||
import subprocess
|
||||
subprocess.run(['pip', 'install', 'cupy-cuda11x>=12.0.0'])
|
||||
print('Installed CuPy for CUDA 11.x')
|
||||
elif cuda_version.startswith('12.'):
|
||||
import subprocess
|
||||
subprocess.run(['pip', 'install', 'cupy-cuda12x>=12.0.0'])
|
||||
print('Installed CuPy for CUDA 12.x')
|
||||
else:
|
||||
print(f'Unsupported CUDA version: {cuda_version}')
|
||||
else:
|
||||
print('CUDA not available, skipping CuPy installation')
|
||||
"
|
||||
|
||||
# Install SAM2 separately (not on PyPI)
|
||||
echo "🎯 Installing SAM2..."
|
||||
pip install git+https://github.com/facebookresearch/segment-anything-2.git
|
||||
|
||||
Reference in New Issue
Block a user