Self-hosted AI workspace.
Python
fix(windows): detect installed CUDA toolkit on launch (#2639)
Dividesbyzer0216881af3984
diff --git a/launch-windows.ps1 b/launch-windows.ps1index 8b53c43e6..16938c195 100644--- a/launch-windows.ps1+++ b/launch-windows.ps1@@ -141,7 +141,20 @@ if (-not (Find-GitBash)) {Write-Host " https://git-scm.com/download/win" -ForegroundColor Yellow}-# 6. Start the server (use `python -m uvicorn` - bare `uvicorn` may not be on PATH)+# 6. Point CUDA_PATH at a real CUDA toolkit so GPU llama-cpp-python can import.+$cudaBase = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA"+if (Test-Path $cudaBase) {+ $cudaBest = Get-ChildItem $cudaBase -Directory -ErrorAction SilentlyContinue |+ Where-Object { Test-Path (Join-Path $_.FullName "bin") } |+ Sort-Object { try { [version]($_.Name -replace "^v", "") } catch { [version]"0.0" } } -Descending |+ Select-Object -First 1+ if ($cudaBest) {+ $env:CUDA_PATH = $cudaBest.FullName+ Write-Host ("Using CUDA_PATH = " + $cudaBest.FullName) -ForegroundColor Cyan+ }+}++# 7. Start the server (use `python -m uvicorn` - bare `uvicorn` may not be on PATH)Write-Step ("Starting Odysseus at http://{0}:{1}" -f $BindHost, $Port)Write-Host "Press Ctrl+C to stop."Write-Host ""