SIGN IN SIGN UP
2023-05-26 17:56:20 -04:00
update:
poetry install
git submodule update --init --recursive
update.vendor:
cd vendor/llama.cpp && git pull origin master
deps:
2023-09-14 02:01:45 -04:00
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[all]"
2023-05-26 17:56:20 -04:00
build:
2024-01-19 08:47:56 -05:00
python3 -m pip install --verbose -e .
2023-05-26 17:56:20 -04:00
2024-02-21 11:04:30 -05:00
build.debug:
python3 -m pip install \
--verbose \
--config-settings=cmake.verbose=true \
--config-settings=logging.level=INFO \
--config-settings=install.strip=false \
--config-settings=cmake.args="-DCMAKE_BUILD_TYPE=Debug;-DCMAKE_C_FLAGS='-ggdb -O0';-DCMAKE_CXX_FLAGS='-ggdb -O0'" \
--editable .
2024-02-21 11:04:30 -05:00
2024-12-06 07:36:47 -05:00
build.debug.extra:
python3 -m pip install \
--verbose \
--config-settings=cmake.verbose=true \
--config-settings=logging.level=INFO \
--config-settings=install.strip=false \
--config-settings=cmake.args="-DCMAKE_BUILD_TYPE=Debug;-DCMAKE_C_FLAGS='-fsanitize=address -ggdb -O0';-DCMAKE_CXX_FLAGS='-fsanitize=address -ggdb -O0'" \
--editable .
2023-05-26 17:56:20 -04:00
build.cuda:
CMAKE_ARGS="-DGGML_CUDA=on" python3 -m pip install --verbose -e .
2023-05-26 17:56:20 -04:00
build.openblas:
CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS" python3 -m pip install --verbose -e .
2023-05-26 17:56:20 -04:00
build.blis:
CMAKE_ARGS="-DGGML_BLAS=on -DGGML_BLAS_VENDOR=FLAME" python3 -m pip install --verbose -e .
2023-05-26 17:56:20 -04:00
2023-06-08 00:22:39 -04:00
build.metal:
CMAKE_ARGS="-DGGML_METAL=on" python3 -m pip install --verbose -e .
2023-06-08 00:22:39 -04:00
2024-01-29 10:39:23 -05:00
build.vulkan:
CMAKE_ARGS="-DGGML_VULKAN=on" python3 -m pip install --verbose -e .
2024-01-29 10:39:23 -05:00
2024-01-30 09:48:09 -05:00
build.kompute:
CMAKE_ARGS="-DGGML_KOMPUTE=on" python3 -m pip install --verbose -e .
2024-01-30 09:48:09 -05:00
build.sycl:
CMAKE_ARGS="-DGGML_SYCL=on" python3 -m pip install --verbose -e .
2024-01-30 09:48:09 -05:00
build.rpc:
CMAKE_ARGS="-DGGML_RPC=on" python3 -m pip install --verbose -e .
2023-05-26 17:56:20 -04:00
build.sdist:
2024-12-06 07:36:47 -05:00
python3 -m build --sdist --verbose
2023-05-26 17:56:20 -04:00
deploy.pypi:
python3 -m twine upload dist/*
deploy.gh-docs:
mkdocs build
mkdocs gh-deploy
2023-07-06 17:57:56 -04:00
test:
2024-12-06 07:36:47 -05:00
python3 -m pytest --full-trace -v
2023-07-06 17:57:56 -04:00
lint:
python3 -m ruff check llama_cpp tests
python3 -m ruff format --check llama_cpp tests
format:
python3 -m ruff check --fix llama_cpp tests
python3 -m ruff format llama_cpp tests
2023-07-07 03:38:51 -04:00
docker:
docker build -t llama-cpp-python:latest -f docker/simple/Dockerfile .
run-server:
2024-12-06 07:37:53 -05:00
python3 -m llama_cpp.server --model ${MODEL}
2023-07-07 03:38:51 -04:00
2023-05-26 17:56:20 -04:00
clean:
- rm -rf _skbuild
2024-12-06 07:36:47 -05:00
- rm llama_cpp/lib/*.so
- rm llama_cpp/lib/*.dylib
- rm llama_cpp/lib/*.metal
- rm llama_cpp/lib/*.dll
- rm llama_cpp/lib/*.lib
2023-05-26 17:56:20 -04:00
.PHONY: \
update \
update.vendor \
build \
build.cuda \
build.opencl \
build.openblas \
build.sdist \
deploy.pypi \
deploy.gh-docs \
lint \
format \
2023-07-07 03:38:51 -04:00
docker \
clean