Newer
Older
TelosDB / scripts / setup-llama-server-vulkan.ps1
@楽曲作りまくりおじさん 楽曲作りまくりおじさん 7 days ago 1 KB feat: integrate llama-server sidecar with Gemma 3 300M support
# setup-llama-server-vulkan.ps1
$Url = "https://github.com/ggerganov/llama.cpp/releases/download/b7956/llama-b7956-bin-win-vulkan-x64.zip"
$ZipFile = "llama_vulkan.zip"
$ExtractDir = "llama_vulkan_extracted"

Write-Host "Downloading llama-server b7956 (Vulkan)..." -ForegroundColor Cyan
Invoke-WebRequest -Uri $Url -OutFile $ZipFile

if (Test-Path $ExtractDir) { Remove-Item -Path $ExtractDir -Recurse -Force }
Write-Host "Extracting..." -ForegroundColor Cyan
Expand-Archive -Path $ZipFile -DestinationPath $ExtractDir -Force

# 配置
$BinDir = "src-tauri/bin"
$ResDir = "src-tauri/resources"

if (!(Test-Path $BinDir)) { New-Item -ItemType Directory -Path $BinDir -Force }
if (!(Test-Path $ResDir)) { New-Item -ItemType Directory -Path $ResDir -Force }

Write-Host "Copying files to $BinDir and $ResDir..." -ForegroundColor Cyan
Copy-Item "$ExtractDir/llama-server.exe" "$BinDir/llama-server-x86_64-pc-windows-msvc.exe" -Force
Copy-Item "$ExtractDir/*.dll" "$ResDir/" -Force
Copy-Item "$ExtractDir/*.dll" "$BinDir/" -Force

Write-Host "Done." -ForegroundColor Green