ishka2009 commited on
Commit
d155caa
·
verified ·
1 Parent(s): 394ad2f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -2,17 +2,20 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install Python dependencies
6
- COPY requirements.txt .
7
-
8
- # Install llama-cpp-python from prebuilt wheel (CPU-only, much faster than building)
9
- RUN pip install --no-cache-dir \
10
- https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.90/llama_cpp_python-0.2.90-cp310-cp310-linux_x86_64.whl
11
 
12
- # Install other requirements
 
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Copy application file (combined FastAPI + Gradio)
 
 
 
16
  COPY app.py .
17
 
18
  # Expose ports
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install build dependencies temporarily
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ cmake \
9
+ && rm -rf /var/lib/apt/lists/*
 
10
 
11
+ # Copy and install Python dependencies
12
+ COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Build and install llama-cpp-python from source (CPU-only)
16
+ RUN pip install --no-cache-dir llama-cpp-python
17
+
18
+ # Copy application file
19
  COPY app.py .
20
 
21
  # Expose ports