Javedalam commited on
Commit
7363a10
·
1 Parent(s): 50d0f69

Add Dockerfile for llama.cpp Space and update README

Browse files
Files changed (3) hide show
  1. .dockerignore +3 -0
  2. Dockerfile +12 -0
  3. README.md +6 -11
.dockerignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ __pycache__/
2
+ *.pyc
3
+ *.tmp
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM debian:bookworm-slim
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+ RUN apt-get update && apt-get install -y --no-install-recommends git build-essential cmake python3 python3-pip curl ca-certificates pkg-config libcurl4-openssl-dev && rm -rf /var/lib/apt/lists/*
5
+
6
+ WORKDIR /app
7
+ RUN git clone --depth 1 https://github.com/ggerganov/llama.cpp.git && cd llama.cpp && mkdir build && cd build && cmake -DGGML_NATIVE=ON -DLLAMA_BUILD_SERVER=ON .. && cmake --build . -j
8
+
9
+ RUN mkdir -p /models && curl -L -o /models/model.gguf https://huggingface.co/bartowski/Qwen2.5-0.5B-Instruct-GGUF/resolve/main/Qwen2.5-0.5B-Instruct-Q4_K_M.gguf
10
+
11
+ EXPOSE 7860
12
+ CMD ["bash","-lc","/app/llama.cpp/build/bin/llama-server -m /models/model.gguf -c 2048 -ngl 0 -t 4 --host 0.0.0.0 --port 7860"]
README.md CHANGED
@@ -1,12 +1,7 @@
1
- ---
2
- title: Llamacpp Tiny
3
- emoji: 🚀
4
- colorFrom: yellow
5
- colorTo: blue
6
- sdk: docker
7
- pinned: false
8
- license: apache-2.0
9
- short_description: a test docker space
10
- ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ ---
2
+ title: Llama.cpp Tiny (Docker)
3
+ sdk: docker
4
+ app_port: 7860
5
+ ---
 
 
 
 
 
6
 
7
+ Tiny llama.cpp server on CPU using Qwen2.5-0.5B-Instruct (Q4_K_M).