File tree Expand file tree Collapse file tree 5 files changed +25
-14
lines changed Expand file tree Collapse file tree 5 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -969,10 +969,7 @@ jobs:
969969 - name : Build llama-cpp-darwin
970970 run : |
971971 make protogen-go
972- make build
973- bash scripts/build-llama-cpp-darwin.sh
974- ls -la build/darwin.tar
975- mv build/darwin.tar build/llama-cpp.tar
972+ make backends/llama-cpp-darwin
976973 - name : Upload llama-cpp.tar
977974 uses : actions/upload-artifact@v4
978975 with :
@@ -1060,9 +1057,7 @@ jobs:
10601057 make protogen-go
10611058 make build
10621059 export PLATFORMARCH=darwin/amd64
1063- bash scripts/build-llama-cpp-darwin.sh
1064- ls -la build/darwin.tar
1065- mv build/darwin.tar build/llama-cpp.tar
1060+ make backends/llama-cpp-darwin
10661061 - name : Upload llama-cpp.tar
10671062 uses : actions/upload-artifact@v4
10681063 with :
Original file line number Diff line number Diff line change @@ -214,11 +214,7 @@ jobs:
214214 - name : Build llama-cpp-darwin
215215 run : |
216216 make protogen-go
217- make build
218- bash scripts/build-llama-cpp-darwin.sh
219- ls -la build/darwin.tar
220- mv build/darwin.tar build/llama-cpp.tar
221- ./local-ai backends install "ocifile://$PWD/build/llama-cpp.tar"
217+ make backends/llama-cpp-darwin
222218 - name : Test
223219 run : |
224220 export C_INCLUDE_PATH=/usr/local/include
Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ backends/kitten-tts: docker-build-kitten-tts docker-save-kitten-tts build
165165backends/kokoro : docker-build-kokoro docker-save-kokoro build
166166 ./local-ai backends install " ocifile://$( abspath ./backend-images/kokoro.tar) "
167167
168+ backends/llama-cpp-darwin : build
169+ bash ./scripts/build-llama-cpp-darwin.sh
170+ mv build/darwin.tar build/llama-cpp.tar
171+ ./local-ai backends install " ocifile://$( abspath ./build/llama-cpp.tar) "
172+
168173# #######################################################
169174# # AIO tests
170175# #######################################################
Original file line number Diff line number Diff line change 4242
4343# Extend ld library path with the dir where this script is located/lib
4444if [ " $( uname) " == " Darwin" ]; then
45- DYLD_FALLBACK_LIBRARY_PATH=$CURDIR /lib:$DYLD_FALLBACK_LIBRARY_PATH
45+ export DYLD_LIBRARY_PATH=$CURDIR /lib:$DYLD_LIBRARY_PATH
46+ # export DYLD_FALLBACK_LIBRARY_PATH=$CURDIR/lib:$DYLD_FALLBACK_LIBRARY_PATH
4647else
4748 export LD_LIBRARY_PATH=$CURDIR /lib:$LD_LIBRARY_PATH
4849fi
5758echo " Using binary: $BINARY "
5859exec $CURDIR /$BINARY " $@ "
5960
60- # In case we fail execing, just run fallback
61+ # We should never reach this point, however just in case we do, run fallback
6162exec $CURDIR /llama-cpp-fallback " $@ "
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ cp -rf backend/cpp/llama-cpp/llama-cpp-fallback build/darwin/
2424cp -rf backend/cpp/llama-cpp/llama-cpp-grpc build/darwin/
2525cp -rf backend/cpp/llama-cpp/llama-cpp-rpc-server build/darwin/
2626
27+ ADDITIONAL_LIBS=${ADDITIONAL_LIBS:- $(ls / opt/ homebrew/ Cellar/ protobuf/**/ lib/ libutf8_validity.dylib)}
28+
29+ for file in $ADDITIONAL_LIBS ; do
30+ cp -rfv $file build/darwin/lib
31+ done
32+
2733for file in build/darwin/* ; do
2834 LIBS=" $( otool -L $file | awk ' NR > 1 { system("echo " $1) } ' | xargs echo) "
2935
@@ -38,6 +44,14 @@ for file in build/darwin/*; do
3844 done
3945done
4046
47+ echo " --------------------------------"
48+ echo " ADDITIONAL_LIBS: $ADDITIONAL_LIBS "
49+ echo " --------------------------------"
50+
51+ echo " Bundled libraries:"
52+ ls -la build/darwin/lib
53+
54+
4155cp -rf backend/cpp/llama-cpp/run.sh build/darwin/
4256
4357PLATFORMARCH=" ${PLATFORMARCH:- darwin/ arm64} "
You can’t perform that action at this time.
0 commit comments