Update Dockerfile
Browse filesFor further inference improvement.
- Dockerfile +17 -6
Dockerfile
CHANGED
|
@@ -6,25 +6,36 @@ RUN apt-get update && \
|
|
| 6 |
build-essential \
|
| 7 |
libssl-dev \
|
| 8 |
zlib1g-dev \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
libboost-system-dev \
|
| 10 |
libboost-filesystem-dev \
|
|
|
|
|
|
|
| 11 |
cmake \
|
|
|
|
| 12 |
git \
|
| 13 |
python3-pip \
|
| 14 |
curl \
|
|
|
|
| 15 |
wget && \
|
| 16 |
rm -rf /var/lib/apt/lists/*
|
| 17 |
-
|
| 18 |
# Install Python dependencies
|
| 19 |
RUN pip3 install huggingface-hub openai gradio
|
| 20 |
|
| 21 |
-
# Build llama.cpp
|
| 22 |
RUN git clone https://github.com/ggerganov/llama.cpp && \
|
| 23 |
cd llama.cpp && \
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# Download model
|
| 30 |
RUN mkdir -p /models && \
|
|
|
|
| 6 |
build-essential \
|
| 7 |
libssl-dev \
|
| 8 |
zlib1g-dev \
|
| 9 |
+
libboost-math-dev \
|
| 10 |
+
libboost-python-dev \
|
| 11 |
+
libboost-timer-dev \
|
| 12 |
+
libboost-thread-dev \
|
| 13 |
libboost-system-dev \
|
| 14 |
libboost-filesystem-dev \
|
| 15 |
+
libopenblas-dev \
|
| 16 |
+
libomp-dev \
|
| 17 |
cmake \
|
| 18 |
+
pkg-config \
|
| 19 |
git \
|
| 20 |
python3-pip \
|
| 21 |
curl \
|
| 22 |
+
libcurl4-openssl-dev \
|
| 23 |
wget && \
|
| 24 |
rm -rf /var/lib/apt/lists/*
|
| 25 |
+
|
| 26 |
# Install Python dependencies
|
| 27 |
RUN pip3 install huggingface-hub openai gradio
|
| 28 |
|
| 29 |
+
# Build llama.cpp with OpenBLAS
|
| 30 |
RUN git clone https://github.com/ggerganov/llama.cpp && \
|
| 31 |
cd llama.cpp && \
|
| 32 |
+
cmake -B build -S . \
|
| 33 |
+
-DLLAMA_BUILD_SERVER=ON \
|
| 34 |
+
-DLLAMA_BUILD_EXAMPLES=ON \
|
| 35 |
+
-DGGML_BLAS=ON \
|
| 36 |
+
-DGGML_BLAS_VENDOR=OpenBLAS \
|
| 37 |
+
-DCMAKE_BUILD_TYPE=Release && \
|
| 38 |
+
cmake --build build --config Release --target llama-server -j $(nproc)
|
| 39 |
|
| 40 |
# Download model
|
| 41 |
RUN mkdir -p /models && \
|