-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.ps1
32 lines (21 loc) · 1.09 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Download Ollama
.\wget --no-hsts -q "https://github.com/ollama/ollama/releases/download/$env:GH_CI_TAG/ollama-windows-amd64.zip" -O .\ollama-windows-amd64.zip
Expand-Archive -Path .\ollama-windows-amd64.zip -DestinationPath .\build\ollama-windows-amd64
# Build ltsc2022
if ($env:GH_CI_LATEST -eq "true") {
docker build --isolation hyperv --no-cache --pull -t eisai/ollama:latest -t eisai/ollama:$env:GH_CI_TAG .\build
} else {
docker build --isolation hyperv --no-cache --pull -t eisai/ollama:$env:GH_CI_TAG .\build
}
# Build ltsc2025
$i=Get-Content -Path .\build\Dockerfile
Set-Content -Path .\build\Dockerfile -Value $($i.replace("FROM mcr.microsoft.com/windows/servercore:ltsc2022","FROM mcr.microsoft.com/windows/servercore:ltsc2025"))
if ($env:GH_CI_LATEST -eq "true") {
docker build --isolation hyperv --no-cache --pull -t eisai/ollama:ltsc2025 -t eisai/ollama:$env:GH_CI_TAG-ltsc2025 .\build
} else {
docker build --isolation hyperv --no-cache --pull -t eisai/ollama:$env:GH_CI_TAG-ltsc2025 .\build
}
# Push
if ($env:GH_CI_PUSH -eq "true") {
docker push eisai/ollama -a
}