llama.cpp/Makefile

70 lines
1.3 KiB
Makefile
Raw Normal View History

2023-05-26 21:56:20 +00:00
update:
poetry install
git submodule update --init --recursive
update.vendor:
cd vendor/llama.cpp && git pull origin master
deps:
2023-09-14 06:01:45 +00:00
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[all]"
2023-05-26 21:56:20 +00:00
build:
python3 -m pip install -e .
2023-05-26 21:56:20 +00:00
build.cuda:
2023-09-12 23:01:16 +00:00
CMAKE_ARGS="-DLLAMA_CUBLAS=on" python3 -m pip install -e .
2023-05-26 21:56:20 +00:00
build.opencl:
2023-09-12 23:01:16 +00:00
CMAKE_ARGS="-DLLAMA_CLBLAST=on" python3 -m pip install -e .
2023-05-26 21:56:20 +00:00
build.openblas:
2023-09-12 23:01:16 +00:00
CMAKE_ARGS="-DLLAMA_CLBLAST=on" python3 -m pip install -e .
2023-05-26 21:56:20 +00:00
build.blis:
2023-09-12 23:01:16 +00:00
CMAKE_ARGS="-DLLAMA_OPENBLAS=on -DLLAMA_OPENBLAS_VENDOR=blis" python3 -m pip install -e .
2023-05-26 21:56:20 +00:00
2023-06-08 04:22:39 +00:00
build.metal:
2023-09-12 23:01:16 +00:00
CMAKE_ARGS="-DLLAMA_METAL=on" python3 -m pip install -e .
2023-06-08 04:22:39 +00:00
2023-05-26 21:56:20 +00:00
build.sdist:
python3 -m build --sdist
2023-05-26 21:56:20 +00:00
deploy.pypi:
python3 -m twine upload dist/*
deploy.gh-docs:
mkdocs build
mkdocs gh-deploy
2023-07-06 21:57:56 +00:00
test:
python3 -m pytest
2023-07-07 07:38:51 +00:00
docker:
docker build -t llama-cpp-python:latest -f docker/simple/Dockerfile .
run-server:
uvicorn --factory llama.server:app --host ${HOST} --port ${PORT}
2023-05-26 21:56:20 +00:00
clean:
- cd vendor/llama.cpp && make clean
- cd vendor/llama.cpp && rm libllama.so
- rm -rf _skbuild
- rm llama_cpp/*.so
- rm llama_cpp/*.dylib
2023-06-10 22:17:34 +00:00
- rm llama_cpp/*.metal
- rm llama_cpp/*.dll
2023-06-10 22:17:34 +00:00
- rm llama_cpp/*.lib
2023-05-26 21:56:20 +00:00
.PHONY: \
update \
update.vendor \
build \
build.cuda \
build.opencl \
build.openblas \
build.sdist \
deploy.pypi \
deploy.gh-docs \
2023-07-07 07:38:51 +00:00
docker \
2023-05-26 21:56:20 +00:00
clean