|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| $ErrorActionPreference = "Stop"
|
|
|
| Write-Host "==================================================" -ForegroundColor Cyan
|
| Write-Host " FusionNet β NVIDIA CUDA Setup (Windows) " -ForegroundColor Cyan
|
| Write-Host "==================================================" -ForegroundColor Cyan
|
|
|
|
|
| if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
|
| Write-Error "Python not found. Install Python 3.10+ from https://python.org and add it to PATH."
|
| exit 1
|
| }
|
| $pyVersion = python --version
|
| Write-Host "`nPython : $pyVersion" -ForegroundColor Green
|
|
|
|
|
| Write-Host "`nUpgrading pip..." -ForegroundColor Yellow
|
| python -m pip install --upgrade pip
|
|
|
|
|
|
|
| Write-Host "`nInstalling PyTorch cu128 (CUDA 12.8)..." -ForegroundColor Yellow
|
| pip install torch==2.11.0+cu128 torchvision==0.26.0+cu128 torchaudio==2.11.0+cu128 `
|
| --index-url https://download.pytorch.org/whl/cu128
|
|
|
|
|
| Write-Host "`nInstalling project dependencies..." -ForegroundColor Yellow
|
| pip install -r "$PSScriptRoot\..\requirements.txt"
|
|
|
|
|
| Write-Host "`nInstalling fusionnet-client dependencies..." -ForegroundColor Yellow
|
| pip install -r "$PSScriptRoot\..\fusionnet-client\requirements.txt"
|
|
|
|
|
| Write-Host "`n--------------------------------------------------" -ForegroundColor Cyan
|
| Write-Host " Environment Verification" -ForegroundColor Cyan
|
| Write-Host "--------------------------------------------------" -ForegroundColor Cyan
|
|
|
| python -c @"
|
| import os, sys
|
| # CUDA DLLs on Windows require System32 in search path
|
| if sys.platform == 'win32':
|
| os.add_dll_directory(r'C:\Windows\System32')
|
| import torch
|
| print(f'PyTorch : {torch.__version__}')
|
| print(f'CUDA : {torch.cuda.is_available()}')
|
| if torch.cuda.is_available():
|
| p = torch.cuda.get_device_properties(0)
|
| print(f'GPU : {p.name} ({p.total_memory / 1024**3:.1f} GB)')
|
| print(f'CUDA ver : {torch.version.cuda}')
|
| else:
|
| print('WARNING : No CUDA GPU detected. Check your NVIDIA driver (>= 560 required).')
|
| "@
|
|
|
| Write-Host "`n[OK] Setup complete. Run the client with:" -ForegroundColor Green
|
| Write-Host " cd fusionnet-client" -ForegroundColor White
|
| Write-Host " python main.py --client-id 0 --num-clients 4" -ForegroundColor White
|
|
|