llama.cpp/Makefile

61 lines
1.5 KiB
Makefile
Raw Normal View History

2023-05-26 21:56:20 +00:00
update:
poetry install
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
2023-05-26 21:56:20 +00:00
git submodule update --init --recursive
update.vendor:
cd vendor/llama.cpp && git pull origin master
build:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
python3 -m pip install --verbose --editable .
2023-05-26 21:56:20 +00:00
build.cuda:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 python3 -m pip install --verbose --editable .
2023-05-26 21:56:20 +00:00
build.opencl:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
CMAKE_ARGS="-DLLAMA_CLBLAST=on" FORCE_CMAKE=1 python3 -m pip install --verbose --editable .
2023-05-26 21:56:20 +00:00
build.openblas:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
CMAKE_ARGS="-DLLAMA_OPENBLAS=on" FORCE_CMAKE=1 python3 -m pip install --verbose --editable .
2023-05-26 21:56:20 +00:00
build.blis:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
CMAKE_ARGS="-DLLAMA_OPENBLAS=on -DLLAMA_OPENBLAS_VENDOR=blis" FORCE_CMAKE=1 python3 -m pip install --verbose --editable .
2023-05-26 21:56:20 +00:00
2023-06-08 04:22:39 +00:00
build.metal:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip
CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 python3 -m pip install --verbose --editable .
2023-06-08 04:22:39 +00:00
2023-05-26 21:56:20 +00:00
build.sdist:
2023-06-09 01:49:42 +00:00
python3 -m pip install --upgrade pip build
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
clean:
- cd vendor/llama.cpp && make clean
- cd vendor/llama.cpp && rm libllama.so
- rm llama_cpp/*.so
- rm llama_cpp/*.dylib
- rm llama_cpp/*.dll
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 \
clean