5fp commited on
Commit
b7edcbf
1 Parent(s): b904cb9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG UBUNTU_VERSION=22.04
2
+ ARG BASE_CPU_CONTAINER=ubuntu:${UBUNTU_VERSION}
3
+
4
+ FROM ${BASE_CPU_CONTAINER} as build
5
+
6
+ RUN apt-get update && \
7
+ apt-get install -y build-essential git make cmake wget && \
8
+ git clone https://github.com/ggerganov/llama.cpp.git /build/llama.cpp && \
9
+ cd /build/llama.cpp && \
10
+ make llama-server && \
11
+ wget -nv https://huggingface.co/Green-Sky/TriLM_3.9B-GGUF/resolve/main/TriLM_3.9B_Unpacked-4.0B-TQ2_0.gguf -O /data/model.gguf
12
+
13
+ FROM ${BASE_CPU_CONTAINER} as runtime
14
+
15
+ WORKDIR /app
16
+
17
+ COPY --from=build /build/llama.cpp/llama-server /app/llama-server
18
+ COPY --from=build /data/model.gguf /data/model.gguf
19
+ COPY ./run.sh /app/run.sh
20
+
21
+ EXPOSE 7860
22
+
23
+ RUN chmod +x run.sh
24
+
25
+ CMD ["./run.sh"]