Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aff151d

Browse filesBrowse files
committed
Update Makefile
- Needed for building the llama-cpp-python server for Mac OS - Include all libs in `libggml_base_path`
1 parent 68d081d commit aff151d
Copy full SHA for aff151d

File tree

Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed

‎Makefile

Copy file name to clipboardExpand all lines: Makefile
+9-7Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,18 @@ deploy.pyinstaller.mac:
8989
@if [ `uname -m` != "arm64" ]; then echo "Must be on aarch64"; exit 1; fi
9090
@if [ `uname` != "Darwin" ]; then echo "Must be on MacOS"; exit 1; fi
9191
@echo "Building and installing with proper env vars for aarch64-specific ops"
92-
CMAKE_ARGS="-DGGML_METAL=off -DGGML_LLAMAFILE=OFF -DGGML_BLAS=OFF -DCMAKE_BUILD_TYPE=Release" python3 -m pip install -v -e .[server,dev]
92+
93+
# This still builds with metal support (I think b/c GGML_NATIVE=ON). Not an
94+
# issue since can still run Q4_0 models w/ repacking support on CPU if `-ngl 0`.
95+
CMAKE_ARGS="-DGGML_METAL=OFF -DGGML_LLAMAFILE=OFF -DGGML_BLAS=OFF \
96+
-DGGML_NATIVE=ON -DGGML_CPU_AARCH64=ON \
97+
-DCMAKE_BUILD_TYPE=Release" python3 -m pip install -v -e .[server,dev]
9398
@server_path=$$(python -c 'import llama_cpp.server; print(llama_cpp.server.__file__)' | sed s/init/main/) ; \
9499
echo "Server path: $$server_path" ; \
95-
libllama_path=$$(python -c 'import llama_cpp.llama_cpp; print(llama_cpp.llama_cpp._load_shared_library("llama")._name)') ; \
96-
libggml_path=$$(python -c 'import llama_cpp.llama_cpp; print(llama_cpp.llama_cpp._load_shared_library("ggml")._name)') ; \
97-
echo "libllama path: $$libllama_path" ; \
98-
echo "libggml path: $$libggml_path" ; \
100+
base_path=$$(python -c 'from llama_cpp._ggml import libggml_base_path; print(str(libggml_base_path))') ; \
101+
echo "Base path: $$base_path" ; \
99102
pyinstaller -DF $$server_path \
100-
--add-data $$libllama_path:llama_cpp/lib \
101-
--add-data $$libggml_path:llama_cpp/lib \
103+
--add-data $$base_path:llama_cpp/lib \
102104
-n llama-cpp-py-server
103105

104106
test:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.