Spaces:
Sleeping
Sleeping
Download scripts/build_llama_cpp_wheel_linux.sh from meetara-lab/meetara: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/meetara-lab/meetara/resolve/main/scripts/build_llama_cpp_wheel_linux.sh
- Command line
-
hf download hf://spaces/meetara-lab/meetara/scripts/build_llama_cpp_wheel_linux.sh
-
curl -L -o build_llama_cpp_wheel_linux.sh https://huggingface.co/spaces/meetara-lab/meetara/resolve/main/scripts/build_llama_cpp_wheel_linux.sh
871 Bytes
| # Optional: build llama-cpp-python from source in Docker (e.g. custom patches / non-x86_64). | |
| # Dockerfile installs the official v0.3.19 cp312 linux_x86_64 release wheel from GitHub — no upload needed. | |
| # Requires Docker. Output: ./dist/*.whl | |
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "$0")/.." && pwd)" | |
| mkdir -p "$ROOT/dist" | |
| docker run --rm -v "$ROOT/dist:/out" python:3.12-slim-bookworm bash -c ' | |
| set -e | |
| apt-get update && apt-get install -y --no-install-recommends cmake ninja-build build-essential ca-certificates | |
| pip install --no-cache-dir --upgrade pip wheel setuptools | |
| export CMAKE_ARGS="-DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_SERVER=OFF -DCMAKE_BUILD_TYPE=Release" | |
| export FORCE_CMAKE=1 | |
| export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) | |
| pip wheel --no-cache-dir -w /out "llama-cpp-python==0.3.19" | |
| ls -la /out/ | |
| ' | |