Javedalam commited on
Commit
52f2b89
·
verified ·
1 Parent(s): 7d76ace

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # same style as your last working one, only model changed
2
+ FROM debian:bookworm-slim
3
+
4
+ ARG DEBIAN_FRONTEND=noninteractive
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ git build-essential cmake curl ca-certificates pkg-config \
7
+ libcurl4-openssl-dev \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # build llama.cpp (HTTP server lives in build/bin/llama-server)
11
+ WORKDIR /app
12
+ RUN git clone --depth 1 https://github.com/ggerganov/llama.cpp.git \
13
+ && mkdir -p build && cd build \
14
+ && cmake ../llama.cpp \
15
+ -DCMAKE_BUILD_TYPE=Release \
16
+ -DGGML_NATIVE=ON \
17
+ -DLLAMA_BUILD_EXAMPLES=ON \
18
+ -DLLAMA_BUILD_SERVER=ON \
19
+ -DLLAMA_BUILD_TESTS=OFF \
20
+ && cmake --build . --target llama-server -j
21
+
22
+ # fetch the NEW LiquidAI model (EN↔JP MT)
23
+ RUN mkdir -p /models && \
24
+ curl -fL --retry 5 --retry-delay 2 -o /models/model.gguf \
25
+ "https://huggingface.co/LiquidAI/LFM2-350M-ENJP-MT-GGUF/resolve/main/LFM2-350M-ENJP-MT-Q4_K_M.gguf?download=true"
26
+
27
+ EXPOSE 7860
28
+
29
+ # use a shell so $PORT from Spaces is honored; no --api
30
+ CMD ["bash","-lc","/app/build/bin/llama-server -m /models/model.gguf -c 2048 -ngl 0 --host 0.0.0.0 --port ${PORT:-7860}"]