fix(ci): Ollama 다운로드를 curl.exe로 전환 — IWR 대용량 파일 hang 해소
This commit is contained in:
parent
8a8fb63636
commit
07c3c3873c
1 changed files with 9 additions and 5 deletions
|
|
@ -23,11 +23,15 @@ if (Test-Path (Join-Path $DEST_DIR "ollama.exe")) {
|
|||
if (Test-Path $TEMP_ZIP) { Remove-Item -Force $TEMP_ZIP }
|
||||
|
||||
Write-Host "Downloading: $OLLAMA_URL"
|
||||
try {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest -Uri $OLLAMA_URL -OutFile $TEMP_ZIP -UseBasicParsing
|
||||
} catch {
|
||||
Write-Host "Auto-download failed: $_" -ForegroundColor Red
|
||||
# curl.exe (Win10+ native) handles GitHub redirects, progress output, large files
|
||||
# better than Invoke-WebRequest. -L follow redirects, --fail error on HTTP >=400,
|
||||
# --retry 3, --max-time 1800 (30min), --progress-bar human readable.
|
||||
$curlExe = "$env:SystemRoot\System32\curl.exe"
|
||||
if (-not (Test-Path $curlExe)) { $curlExe = "curl.exe" }
|
||||
& $curlExe -L --fail --retry 3 --max-time 1800 --progress-bar `
|
||||
-o $TEMP_ZIP $OLLAMA_URL
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "curl download failed with exit code $LASTEXITCODE" -ForegroundColor Red
|
||||
Write-Host ""
|
||||
Write-Host "=== Manual install ===" -ForegroundColor Yellow
|
||||
Write-Host "Download ollama-windows-amd64.zip from:"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue