Durga-7780 commited on
Commit
5801a57
·
verified ·
1 Parent(s): 0885946

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,21 +1,19 @@
1
  FROM python:3.11-slim
2
-
3
  ENV PYTHONUNBUFFERED=1
4
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
- poppler-utils tesseract-ocr libtesseract-dev build-essential curl \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
  WORKDIR /app
10
-
11
  COPY requirements.txt /app/requirements.txt
12
-
13
- # upgrade pip (helpful to get modern resolver and wheels)
14
  RUN pip install --upgrade pip setuptools wheel
15
 
 
 
 
 
16
  RUN pip install --no-cache-dir -r /app/requirements.txt
17
 
18
  COPY . /app
19
-
20
  EXPOSE 7860
21
- CMD ["python3", "app.py"]
 
1
  FROM python:3.11-slim
 
2
  ENV PYTHONUNBUFFERED=1
3
 
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ poppler-utils tesseract-ocr build-essential curl && rm -rf /var/lib/apt/lists/*
 
6
 
7
  WORKDIR /app
 
8
  COPY requirements.txt /app/requirements.txt
 
 
9
  RUN pip install --upgrade pip setuptools wheel
10
 
11
+ # Install torch CPU wheel (adjust version if needed)
12
+ RUN pip install --no-cache-dir torch==2.9.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
13
+
14
+ # Then install the rest
15
  RUN pip install --no-cache-dir -r /app/requirements.txt
16
 
17
  COPY . /app
 
18
  EXPOSE 7860
19
+ CMD ["python3", "app.py"]