From 00ea3af51b7f93495a852288487b378455a024d5 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Fri, 26 May 2023 17:56:20 -0400 Subject: [PATCH] Add makefile --- Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c1fe552 --- /dev/null +++ b/Makefile @@ -0,0 +1,49 @@ +update: + poetry install + git submodule update --init --recursive + +update.vendor: + cd vendor/llama.cpp && git pull origin master + +build: + python3 setup.py develop + +build.cuda: + CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 python3 setup.py develop + +build.opencl: + CMAKE_ARGS="-DLLAMA_CLBLAST=on" FORCE_CMAKE=1 python3 setup.py develop + +build.openblas: + CMAKE_ARGS="-DLLAMA_OPENBLAS=on" FORCE_CMAKE=1 python3 setup.py develop + +build.blis: + CMAKE_ARGS="-DLLAMA_OPENBLAS=on -DLLAMA_OPENBLAS_VENDOR=blis" FORCE_CMAKE=1 python3 setup.py develop + +build.sdist: + python3 setup.py sdist + +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 -rf _skbuild + - rm llama_cpp/libllama.so + +.PHONY: \ + update \ + update.vendor \ + build \ + build.cuda \ + build.opencl \ + build.openblas \ + build.sdist \ + deploy.pypi \ + deploy.gh-docs \ + clean \ No newline at end of file