Spaces:
Sleeping
Sleeping
saifisvibinn commited on
Commit ·
6463f1f
1
Parent(s): 8563e60
Simplify requirements.txt and Dockerfile: install PyTorch separately
Browse files- Dockerfile +7 -3
- requirements.txt +0 -14
Dockerfile
CHANGED
|
@@ -21,9 +21,13 @@ RUN apt-get update && apt-get install -y \
|
|
| 21 |
COPY requirements.txt .
|
| 22 |
|
| 23 |
# Install Python dependencies
|
| 24 |
-
#
|
| 25 |
-
RUN pip install --no-cache-dir --upgrade pip && \
|
| 26 |
-
pip install --no-cache-dir -
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Copy application files
|
| 29 |
COPY . .
|
|
|
|
| 21 |
COPY requirements.txt .
|
| 22 |
|
| 23 |
# Install Python dependencies
|
| 24 |
+
# Install PyTorch CPU version first (requires special index)
|
| 25 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
| 26 |
+
pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu \
|
| 27 |
+
torch==2.5.1+cpu torchvision==0.20.1+cpu
|
| 28 |
+
|
| 29 |
+
# Install remaining dependencies
|
| 30 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 31 |
|
| 32 |
# Copy application files
|
| 33 |
COPY . .
|
requirements.txt
CHANGED
|
@@ -1,27 +1,13 @@
|
|
| 1 |
-
# Core PDF & Document Processing
|
| 2 |
doclayout-yolo==0.0.4
|
| 3 |
pymupdf==1.26.6
|
| 4 |
pymupdf-layout==0.0.15
|
| 5 |
pymupdf4llm==0.1.9
|
| 6 |
pypdfium2==5.0.0
|
| 7 |
-
|
| 8 |
-
# Deep Learning (CPU-optimized)
|
| 9 |
-
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 10 |
-
torch==2.5.1+cpu
|
| 11 |
-
torchvision==0.20.1+cpu
|
| 12 |
-
|
| 13 |
-
# Image Processing
|
| 14 |
pillow==12.0.0
|
| 15 |
opencv-python-headless==4.10.0.84
|
| 16 |
-
|
| 17 |
-
# OCR
|
| 18 |
pytesseract==0.3.13
|
| 19 |
-
|
| 20 |
-
# Utilities
|
| 21 |
huggingface-hub==0.26.2
|
| 22 |
loguru==0.7.3
|
| 23 |
numpy==1.26.4
|
| 24 |
-
|
| 25 |
-
# Web Framework
|
| 26 |
flask==3.0.0
|
| 27 |
werkzeug==3.0.1
|
|
|
|
|
|
|
| 1 |
doclayout-yolo==0.0.4
|
| 2 |
pymupdf==1.26.6
|
| 3 |
pymupdf-layout==0.0.15
|
| 4 |
pymupdf4llm==0.1.9
|
| 5 |
pypdfium2==5.0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
pillow==12.0.0
|
| 7 |
opencv-python-headless==4.10.0.84
|
|
|
|
|
|
|
| 8 |
pytesseract==0.3.13
|
|
|
|
|
|
|
| 9 |
huggingface-hub==0.26.2
|
| 10 |
loguru==0.7.3
|
| 11 |
numpy==1.26.4
|
|
|
|
|
|
|
| 12 |
flask==3.0.0
|
| 13 |
werkzeug==3.0.1
|