Kalpokoch commited on
Commit
f5cdb07
·
verified ·
1 Parent(s): 0e44477

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -12
Dockerfile CHANGED
@@ -1,8 +1,6 @@
1
- # This Dockerfile uses your original, fast-building pattern.
2
-
3
  FROM python:3.11-slim
4
 
5
- # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git curl build-essential cmake \
8
  && rm -rf /var/lib/apt/lists/*
@@ -17,24 +15,21 @@ ENV TRANSFORMERS_CACHE=/app/.cache \
17
  HF_HOME=/app/.cache \
18
  CHROMADB_DISABLE_TELEMETRY=true
19
 
20
- # Pre-install the specific, known-working version of llama-cpp-python
21
- # This version matches the tool version used to create your new GGUF file.
22
- RUN pip install --no-cache-dir llama-cpp-python==0.2.61
23
 
24
- # Install the rest of the dependencies
25
  COPY requirements.txt .
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
- # Copy the application code
29
  COPY . .
30
 
31
- # <-- UPDATED: Download your new, compatible GGUF model from the new repo
32
  RUN curl -fL -o /app/phi1.5_dop_q4_k_m.gguf \
33
  https://huggingface.co/Kalpokoch/Phi1.5QuantizedFineTuned/resolve/main/phi1.5_dop_q4_k_m.gguf \
34
  && echo "✅ Model downloaded."
35
 
36
- # Expose the application port
37
  EXPOSE 7860
38
 
39
- # Run the FastAPI application
40
- CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
1
  FROM python:3.11-slim
2
 
3
+ # Install build tools for llama.cpp
4
  RUN apt-get update && apt-get install -y \
5
  git curl build-essential cmake \
6
  && rm -rf /var/lib/apt/lists/*
 
15
  HF_HOME=/app/.cache \
16
  CHROMADB_DISABLE_TELEMETRY=true
17
 
18
+ # Install llama-cpp-python runtime-only version (0.2.75 for GGUF v3 inference)
19
+ RUN pip install --no-cache-dir llama-cpp-python==0.2.75
 
20
 
21
+ # Install all remaining dependencies
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
+ # Copy app files and data
26
  COPY . .
27
 
28
+ # Download your quantized GGUF model
29
  RUN curl -fL -o /app/phi1.5_dop_q4_k_m.gguf \
30
  https://huggingface.co/Kalpokoch/Phi1.5QuantizedFineTuned/resolve/main/phi1.5_dop_q4_k_m.gguf \
31
  && echo "✅ Model downloaded."
32
 
 
33
  EXPOSE 7860
34
 
35
+ CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "7860"]