Xenobd commited on
Commit
0c32fcf
·
verified ·
1 Parent(s): f622852

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python slim image
2
+ FROM python:3.12-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Avoid Python buffering issues
8
+ ENV PYTHONUNBUFFERED=1
9
+
10
+ # Install system dependencies
11
+ RUN apt-get update && apt-get install -y \
12
+ build-essential \
13
+ git \
14
+ curl \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Install llama-cpp-python with server extras
18
+ RUN pip install --no-cache-dir "llama-cpp-python[server]>=0.1.81"
19
+
20
+ # Copy your model file if needed
21
+ # COPY smollm2-360m-instruct-q8_0.gguf ./models/
22
+
23
+ # Expose default server port
24
+ EXPOSE 5000
25
+
26
+ # Run llama-cpp server directly
27
+ CMD ["python", "-m", "llama_cpp.server", "--model", "HuggingFaceTB/SmolLM2-360M-Instruct-GGUF", "--filename", "smollm2-360m-instruct-q8_0.gguf", "--host", "0.0.0.0", "--port", "5000"]