Sabithulla commited on
Commit
96b77f2
·
1 Parent(s): 3323511

Fix: revert to standard pip install (binary-only broke uvicorn install)

Browse files
Files changed (2) hide show
  1. Dockerfile +15 -4
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -2,17 +2,28 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install minimal system dependencies (no build tools = faster!)
6
  RUN apt-get update && apt-get install -y \
 
7
  tesseract-ocr \
8
  libtesseract-dev \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Copy requirements
12
  COPY requirements.txt .
13
 
14
- # Install all dependencies with BINARY WHEELS ONLY (skip compilation)
15
- RUN pip install --no-cache-dir --only-binary=:all: -r requirements.txt 2>&1 | grep -v "Skipping"
 
 
 
 
 
 
 
 
 
 
16
 
17
  # Copy application code
18
  COPY . .
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
  tesseract-ocr \
9
  libtesseract-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Copy and install requirements
13
  COPY requirements.txt .
14
 
15
+ # Install with fallback to source if wheels unavailable
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy app
19
+ COPY . .
20
+
21
+ # Create models directory
22
+ RUN mkdir -p models
23
+
24
+ EXPOSE 7860
25
+
26
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
27
 
28
  # Copy application code
29
  COPY . .
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  fastapi
2
  uvicorn
3
- llama-cpp-python==0.2.70
4
  supabase
5
  python-multipart
6
  pytesseract
 
1
  fastapi
2
  uvicorn
3
+ llama-cpp-python
4
  supabase
5
  python-multipart
6
  pytesseract