pin llama-cpp-python to 0.2.55 due to https://github.com/abetlen/llama-cpp-python/issues/1288
This commit is contained in:
parent
da86fa463f
commit
c6db7f5d01
|
@ -3,9 +3,7 @@ import subprocess
|
||||||
from inspect import currentframe, getframeinfo
|
from inspect import currentframe, getframeinfo
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import dotenv
|
from decouple import config
|
||||||
|
|
||||||
configs = dotenv.dotenv_values(".env")
|
|
||||||
|
|
||||||
system_name = platform.system()
|
system_name = platform.system()
|
||||||
|
|
||||||
|
@ -53,7 +51,7 @@ def serve_llamacpp_python(local_model_file: Path, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
local_model_file = configs.get("LOCAL_MODEL", "")
|
local_model_file = config("LOCAL_MODEL", default="")
|
||||||
|
|
||||||
if not local_model_file:
|
if not local_model_file:
|
||||||
print("LOCAL_MODEL not set in the `.env` file.")
|
print("LOCAL_MODEL not set in the `.env` file.")
|
||||||
|
|
|
@ -87,7 +87,7 @@ activate_environment
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
# ver 0.2.56 produces segment error for /embeddings on MacOS
|
# ver 0.2.56 produces segment error for /embeddings on MacOS
|
||||||
python -m pip install llama-cpp-python[server]!=0.2.56
|
python -m pip install llama-cpp-python[server]==0.2.55
|
||||||
|
|
||||||
# start the server with passed params
|
# start the server with passed params
|
||||||
python -m llama_cpp.server $@
|
python -m llama_cpp.server $@
|
||||||
|
|
|
@ -88,7 +88,7 @@ activate_environment
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
# ver 0.2.56 produces segment error for /embeddings on MacOS
|
# ver 0.2.56 produces segment error for /embeddings on MacOS
|
||||||
python -m pip install llama-cpp-python[server]!=0.2.56
|
python -m pip install llama-cpp-python[server]==0.2.55
|
||||||
|
|
||||||
# start the server with passed params
|
# start the server with passed params
|
||||||
python -m llama_cpp.server $@
|
python -m llama_cpp.server $@
|
||||||
|
|
|
@ -28,7 +28,7 @@ call :activate_environment
|
||||||
|
|
||||||
@rem install dependencies
|
@rem install dependencies
|
||||||
@rem ver 0.2.56 produces segment error for /embeddings on MacOS
|
@rem ver 0.2.56 produces segment error for /embeddings on MacOS
|
||||||
call python -m pip install llama-cpp-python[server]!=0.2.56
|
call python -m pip install llama-cpp-python[server]==0.2.55
|
||||||
|
|
||||||
@REM @rem start the server with passed params
|
@REM @rem start the server with passed params
|
||||||
call python -m llama_cpp.server %*
|
call python -m llama_cpp.server %*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user