Skip to content

Commit da9f15a

Browse files
committed
Update Dockerfile
- scikit-build -> scikit-build-core - Remove -DGGML_BLAS=ON, OpenBLAS cmake tags from build - Needed (see ggml-org/llama.cpp#5780 (review)) to get this to work properly - Built, deployed, and tested with llama3.1 with q4_0_4_4 quantization
1 parent b196925 commit da9f15a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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
8-
RUN python3 -m pip install --upgrade pip cmake scikit-build setuptools pyinstaller
8+
RUN python3 -m pip install --upgrade pip cmake scikit-build-core[pyproject] setuptools pyinstaller
99

1010
COPY . .
1111

@@ -19,7 +19,10 @@ ENV mtune=cortex-a78c
1919

2020
ENV compiler_flags="-march=${march} -mcpu=${mcpu} -mtune=${mtune}"
2121

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
22+
# This is the build that uses OpenBLAS + LLAMAFILE
23+
# RUN PKG_CONFIG_PATH="/opt/OpenBLAS/install/lib/pkgconfig" CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DGGML_LLAMAFILE=ON -DCMAKE_C_FLAGS='${compiler_flags}' -DCMAKE_CXX_FLAGS='${compiler_flags}'" pip install -v -e .[server] 2>&1 | tee buildlog.txt
24+
# This is a release build that works
25+
RUN CMAKE_ARGS="-DGGML_LLAMAFILE=OFF -DCMAKE_C_FLAGS='${compiler_flags}' -DCMAKE_CXX_FLAGS='${compiler_flags}' -DCMAKE_BUILD_TYPE=Release" pip install -v -e .[server] 2>&1 | tee buildlog.txt
2326

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

0 commit comments

Comments
 (0)