Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
4dcf8016
Unverified
Commit
4dcf8016
authored
Mar 11, 2025
by
Daniel Hiltgen
Committed by
GitHub
Mar 11, 2025
Browse files
Build release for windows with local script (#9636)
parent
26a26998
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
scripts/build_windows.ps1
scripts/build_windows.ps1
+5
-4
No files found.
scripts/build_windows.ps1
View file @
4dcf8016
...
@@ -80,13 +80,14 @@ function checkEnv() {
...
@@ -80,13 +80,14 @@ function checkEnv() {
function
buildOllama
()
{
function
buildOllama
()
{
mkdir
-Force
-path
"
${script:DIST_DIR}
\"
if
(
$
script
:
ARCH
-ne
"arm64"
)
{
if
(
$
script
:
ARCH
-ne
"arm64"
)
{
Remove-Item
-ea
0
-recurse
-force
-path
"
${script:SRC_DIR}
\dist\windows-
${script:ARCH}
"
Remove-Item
-ea
0
-recurse
-force
-path
"
${script:SRC_DIR}
\dist\windows-
${script:ARCH}
"
New-Item
"
${script:SRC_DIR}
\dist\windows-
${script:ARCH}
\lib\ollama\"
-ItemType
Directory
-ea
0
New-Item
"
${script:SRC_DIR}
\dist\windows-
${script:ARCH}
\lib\ollama\"
-ItemType
Directory
-ea
0
&
cmake
--fresh
--preset
CPU
--install-prefix
$
script
:
DIST_DIR
&
cmake
--fresh
--preset
CPU
--install-prefix
$
script
:
DIST_DIR
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--build
--preset
CPU
--parallel
$
script
:
JOBS
&
cmake
--build
--preset
CPU
--config
Release
--parallel
$
script
:
JOBS
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--install
build
--component
CPU
--strip
&
cmake
--install
build
--component
CPU
--strip
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
...
@@ -101,7 +102,7 @@ function buildOllama() {
...
@@ -101,7 +102,7 @@ function buildOllama() {
# to avoid 2022 (or newer) from being used as the default
# to avoid 2022 (or newer) from being used as the default
&
cmake
--fresh
--preset
"CUDA 11"
-G
"Visual Studio 16 2019"
--install-prefix
$
script
:
DIST_DIR
&
cmake
--fresh
--preset
"CUDA 11"
-G
"Visual Studio 16 2019"
--install-prefix
$
script
:
DIST_DIR
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--build
--preset
"CUDA 11"
--parallel
$
script
:
JOBS
&
cmake
--build
--preset
"CUDA 11"
--config
Release
--parallel
$
script
:
JOBS
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--install
build
--component
"CUDA"
--strip
&
cmake
--install
build
--component
"CUDA"
--strip
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
...
@@ -112,7 +113,7 @@ function buildOllama() {
...
@@ -112,7 +113,7 @@ function buildOllama() {
write-host
"Building CUDA v12 backend libraries"
write-host
"Building CUDA v12 backend libraries"
&
cmake
--fresh
--preset
"CUDA 12"
--install-prefix
$
script
:
DIST_DIR
&
cmake
--fresh
--preset
"CUDA 12"
--install-prefix
$
script
:
DIST_DIR
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--build
--preset
"CUDA 12"
--parallel
$
script
:
JOBS
&
cmake
--build
--preset
"CUDA 12"
--config
Release
--parallel
$
script
:
JOBS
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--install
build
--component
"CUDA"
--strip
&
cmake
--install
build
--component
"CUDA"
--strip
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
...
@@ -131,7 +132,7 @@ function buildOllama() {
...
@@ -131,7 +132,7 @@ function buildOllama() {
$
env
:
HIPCXX
=
""
$
env
:
HIPCXX
=
""
$
env
:
HIP_PLATFORM
=
""
$
env
:
HIP_PLATFORM
=
""
$
env
:
CMAKE_PREFIX_PATH
=
""
$
env
:
CMAKE_PREFIX_PATH
=
""
&
cmake
--build
--preset
"ROCm"
--parallel
$
script
:
JOBS
&
cmake
--build
--preset
"ROCm"
--config
Release
--parallel
$
script
:
JOBS
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
&
cmake
--install
build
--component
"HIP"
--strip
&
cmake
--install
build
--component
"HIP"
--strip
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
if
(
$LASTEXITCODE
-ne
0
)
{
exit
(
$LASTEXITCODE
)}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment