-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can it provide an cmake option to disable building of libllama.so? #484
Comments
@Freed-Wu happy to add this, the main issue I see coming up is version mismatch between llama-cpp-python and llama.cpp. |
This issue just leave packager solve it. they have duty to keep it match. It is not a default option so no users will meet it. |
And if user install the package without building libllama.so, Can this package load it from platformdir's import sys
from ctypes import CDLL
from pathlib import Path
from platfromdirs import user_data_dir
ext = {"linux": "so", "win32": "dll", "darwin": "dylib"}[sys.platform]
for libpath in [Path(__file__).parent, user_data_path().parent / 'lib', site_data_path().parent / 'lib']:
if not (libpath / f"libllama.{ext}").exists():
continute
dll_path = str(libpath)
dll = CDLL(dll_path) |
Added in v0.2 was a LLAMA_BUILD cmake flag that can be set to OFF to disable compiling the library, then you can just use the LLAMA_CPP_LIB env variable to point to a pre-built shared library (no guarantee on version compatibility though). |
Describe the solution you'd like
Can it provide a cmake option to disable building of libllama.so? I hope use
/usr/lib/libllama.so
provided by llama.cpp not/usr/lib/python3.11/site-packages/llama_cpp/libllama.so
. I am packaging it to linux distribution, if so, user will not need to install 2libllama.so
.The text was updated successfully, but these errors were encountered: