Forol commited on
Commit
fff978d
·
verified ·
1 Parent(s): 7992198

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -12
Dockerfile CHANGED
@@ -1,16 +1,19 @@
1
- FROM ghcr.io/ggml-org/llama.cpp:server
2
 
3
- # Forces the server to use a writeable temporary directory for Hugging Face compatibility
4
- ENV HOME=/tmp
5
 
6
- # Expose the mandatory port for Hugging Face routing
 
 
 
 
 
 
 
 
 
 
 
7
  EXPOSE 7860
8
 
9
- # Run the official, ultra-optimized C++ server binary directly
10
- CMD [ \
11
- "--host", "0.0.0.0", \
12
- "--port", "7860", \
13
- "--model", "https://huggingface.co/bartowski/google_gemma-3-4b-it-GGUF/resolve/main/google_gemma-3-4b-it-Q4_K_M.gguf", \
14
- "--ctx-size", "2048", \
15
- "--threads", "2" \
16
- ]
 
1
+ FROM python:3.11-slim
2
 
3
+ WORKDIR /app
 
4
 
5
+ # System deps
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ git curl && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Python deps
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # App code
14
+ COPY app.py .
15
+
16
+ # HF Spaces listens on 7860
17
  EXPOSE 7860
18
 
19
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]