Spaces:
Running
Running
Dmitry Beresnev commited on
Commit ·
0e913e4
1
Parent(s): 1a4efad
change compilation flags
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -16,11 +16,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 16 |
# Clone and build llama.cpp with SSL support for HuggingFace Hub
|
| 17 |
WORKDIR /build
|
| 18 |
ARG CACHEBUST=6
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
cd llama.cpp && \
|
| 21 |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
| 22 |
-
-DCMAKE_C_FLAGS_RELEASE="-
|
| 23 |
-
-DCMAKE_CXX_FLAGS_RELEASE="-
|
| 24 |
-DGGML_NATIVE=OFF \
|
| 25 |
-DGGML_AVX2=ON \
|
| 26 |
-DGGML_AVX=ON \
|
|
@@ -31,7 +33,7 @@ RUN git clone https://github.com/ggerganov/llama.cpp.git && \
|
|
| 31 |
-DGGML_BLAS_VENDOR=OpenBLAS \
|
| 32 |
-DLLAMA_CURL=ON \
|
| 33 |
-DLLAMA_OPENSSL=ON && \
|
| 34 |
-
cmake --build build --config Release --target llama-server -j"$
|
| 35 |
echo "=== Binary dependencies ===" && \
|
| 36 |
ldd build/bin/llama-server || true
|
| 37 |
|
|
|
|
| 16 |
# Clone and build llama.cpp with SSL support for HuggingFace Hub
|
| 17 |
WORKDIR /build
|
| 18 |
ARG CACHEBUST=6
|
| 19 |
+
ARG LLAMA_CPP_REF=master
|
| 20 |
+
ARG BUILD_JOBS=2
|
| 21 |
+
RUN git clone --depth 1 --branch ${LLAMA_CPP_REF} https://github.com/ggerganov/llama.cpp.git && \
|
| 22 |
cd llama.cpp && \
|
| 23 |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
| 24 |
+
-DCMAKE_C_FLAGS_RELEASE="-O2 -DNDEBUG" \
|
| 25 |
+
-DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \
|
| 26 |
-DGGML_NATIVE=OFF \
|
| 27 |
-DGGML_AVX2=ON \
|
| 28 |
-DGGML_AVX=ON \
|
|
|
|
| 33 |
-DGGML_BLAS_VENDOR=OpenBLAS \
|
| 34 |
-DLLAMA_CURL=ON \
|
| 35 |
-DLLAMA_OPENSSL=ON && \
|
| 36 |
+
cmake --build build --config Release --target llama-server -j"${BUILD_JOBS}" && \
|
| 37 |
echo "=== Binary dependencies ===" && \
|
| 38 |
ldd build/bin/llama-server || true
|
| 39 |
|