Skip to content

Commit b196925

Browse files
committed
Compilation changes
- Verbose logging / output when compiling - Save buildlog (though currently don't export) so that can inspect build afterward - Build changes: - Disable LLAMAFILE (needed for Q4_0_4_4) - Set march/mcpu/mtune for C/C++ - Make pip verbose (so that get cmake compile output)
1 parent 87e02e3 commit b196925

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:22.04
22

33
# We need to set the host to 0.0.0.0 to allow outside access
4-
ENV HOST 0.0.0.0
4+
ENV HOST=0.0.0.0
55

66
# Install the package
77
RUN apt update && apt install -y ninja-build build-essential pkg-config python3 python3-pip git
@@ -13,7 +13,13 @@ COPY . .
1313
RUN mv /OpenBLAS /opt/OpenBLAS && cd /opt/OpenBLAS && make install PREFIX=/usr/ && cd /
1414

1515
# Have to disable GGML_LLAMAFILE for Q4_0_4_4 quantization
16-
RUN PKG_CONFIG_PATH="/opt/OpenBLAS/install/lib/pkgconfig" CMAKE_ARGS="-DGGML_BLAS=ON;-DGGML_BLAS_VENDOR=OpenBLAS;-DGGML_LLAMAFILE=OFF;-DCMAKE_C_FLAGS=-march=armv8.2-a+crypto+fp16+rcpc+dotprod -mcpu=cortex-a78c+crypto+noprofile+nossbs+noflagm+nopauth -mtune=cortex-a78c" pip install -e .[server]
16+
ENV march=armv8.2-a+crypto+fp16+rcpc+dotprod
17+
ENV mcpu=cortex-a78c+crypto+noprofile+nossbs+noflagm+nopauth
18+
ENV mtune=cortex-a78c
19+
20+
ENV compiler_flags="-march=${march} -mcpu=${mcpu} -mtune=${mtune}"
21+
22+
RUN PKG_CONFIG_PATH="/opt/OpenBLAS/install/lib/pkgconfig" CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DGGML_LLAMAFILE=OFF -DCMAKE_C_FLAGS='${compiler_flags}' -DCMAKE_CXX_FLAGS='${compiler_flags}'" pip install -v -e .[server] 2>&1 | tee buildlog.txt
1723

1824
RUN cd /root && pyinstaller -DF /llama_cpp/server/__main__.py \
1925
--add-data /usr/lib/libopenblas.so:. \

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ cmake.verbose = true
6464
cmake.minimum-version = "3.21"
6565
minimum-version = "0.5.1"
6666
sdist.include = [".git", "vendor/llama.cpp/*"]
67+
logging.level = "INFO"
6768

6869
[tool.scikit-build.metadata.version]
6970
provider = "scikit_build_core.metadata.regex"

0 commit comments

Comments
 (0)