codebyam commited on
Commit
551d27d
·
verified ·
1 Parent(s): c98b1e7

Update Dockerfile

Browse files

For further inference improvement.

Files changed (1) hide show
  1. 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
- mkdir build && \
25
- cd build && \
26
- cmake .. -DLLAMA_BUILD_SERVER=ON -DLLAMA_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release && \
27
- cmake --build . --config Release --target llama-server -j $(nproc)
 
 
 
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 && \