ishka2009 commited on
Commit
0d63be7
·
verified ·
1 Parent(s): 9959b70

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -3
Dockerfile CHANGED
@@ -2,12 +2,20 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
5
  # Copy and install Python dependencies
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
- # Build and install llama-cpp-python from source (CPU-only)
10
- RUN pip install llama-cpp-python --only-binary=:all: --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
11
 
12
  # Copy application file
13
  COPY app.py .
@@ -17,4 +25,3 @@ EXPOSE 7860 7861
17
 
18
  # Run the application
19
  CMD ["python", "app.py"]
20
-
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies for building llama-cpp-python from source
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ cmake \
9
+ git \
10
+ python3-dev \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
  # Copy and install Python dependencies
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Build llama-cpp-python from source (CPU-only)
18
+ RUN pip install --no-cache-dir llama-cpp-python
19
 
20
  # Copy application file
21
  COPY app.py .
 
25
 
26
  # Run the application
27
  CMD ["python", "app.py"]