meetara / scripts /build_llama_cpp_wheel_linux.sh
rameshbasina's picture
Docker: install llama-cpp-python 0.3.19 from official GitHub wheel (qwen35 support)
dd27783
raw
history blame contribute delete
871 Bytes
#!/usr/bin/env bash
# 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/
'