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
c1a10a6e
Unverified
Commit
c1a10a6e
authored
Jan 03, 2024
by
Daniel Hiltgen
Committed by
GitHub
Jan 03, 2024
Browse files
Merge pull request #1781 from dhiltgen/cpu_only_build
Fix CPU only builds
parents
11846866
ddbfa6fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
llm/llama.cpp/gen_linux.sh
llm/llama.cpp/gen_linux.sh
+3
-0
llm/shim_ext_server.go
llm/shim_ext_server.go
+3
-3
No files found.
llm/llama.cpp/gen_linux.sh
View file @
c1a10a6e
...
@@ -35,6 +35,9 @@ BUILD_DIR="gguf/build/linux/cpu"
...
@@ -35,6 +35,9 @@ BUILD_DIR="gguf/build/linux/cpu"
build
build
install
install
# Placeholder to keep go embed happy until we start building dynamic CPU lib variants
touch
${
BUILD_DIR
}
/lib/dummy.so
if
[
-d
/usr/local/cuda/lib64/
]
;
then
if
[
-d
/usr/local/cuda/lib64/
]
;
then
echo
"CUDA libraries detected - building dynamic CUDA library"
echo
"CUDA libraries detected - building dynamic CUDA library"
init_vars
init_vars
...
...
llm/shim_ext_server.go
View file @
c1a10a6e
...
@@ -147,9 +147,9 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {
...
@@ -147,9 +147,9 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {
if
err
!=
nil
||
len
(
files
)
==
0
{
if
err
!=
nil
||
len
(
files
)
==
0
{
return
nil
,
payloadMissing
return
nil
,
payloadMissing
}
}
libs
:=
make
(
[]
string
,
len
(
files
))
libs
:=
[]
string
{}
for
i
,
file
:=
range
files
{
for
_
,
file
:=
range
files
{
pathComps
:=
strings
.
Split
(
file
,
"/"
)
pathComps
:=
strings
.
Split
(
file
,
"/"
)
if
len
(
pathComps
)
!=
7
{
if
len
(
pathComps
)
!=
7
{
log
.
Printf
(
"unexpected payload components: %v"
,
pathComps
)
log
.
Printf
(
"unexpected payload components: %v"
,
pathComps
)
...
@@ -169,7 +169,7 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {
...
@@ -169,7 +169,7 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {
destFile
:=
filepath
.
Join
(
targetDir
,
filepath
.
Base
(
file
))
destFile
:=
filepath
.
Join
(
targetDir
,
filepath
.
Base
(
file
))
if
strings
.
Contains
(
destFile
,
"server"
)
{
if
strings
.
Contains
(
destFile
,
"server"
)
{
libs
[
i
]
=
destFile
libs
=
append
(
libs
,
destFile
)
}
}
_
,
err
=
os
.
Stat
(
destFile
)
_
,
err
=
os
.
Stat
(
destFile
)
...
...
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