roshcheeku commited on
Commit
d1e6e6a
·
verified ·
1 Parent(s): 3fae8ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -6
Dockerfile CHANGED
@@ -1,11 +1,20 @@
1
- # Use official PyTorch image with CUDA support
2
- FROM pytorch/pytorch:2.0.1-cuda11.8-cudnn8-runtime
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
 
 
 
 
 
 
 
 
7
  # Copy requirements and install dependencies
8
  COPY requirements.txt .
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
  # Copy app files
@@ -14,8 +23,8 @@ COPY app.py model_utils.py ./
14
  # Create uploads folder
15
  RUN mkdir uploads
16
 
17
- # Expose Flask port
18
- EXPOSE 5000
19
 
20
- # Run Flask app
21
- CMD ["python", "app.py"]
 
1
+ # Use official Python slim image (CPU-only)
2
+ FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Upgrade pip and install system dependencies needed for pdfplumber, python-docx, openpyxl
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ poppler-utils \
11
+ libglib2.0-0 \
12
+ libmagic1 \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
  # Copy requirements and install dependencies
16
  COPY requirements.txt .
17
+ RUN pip install --no-cache-dir --upgrade pip
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  # Copy app files
 
23
  # Create uploads folder
24
  RUN mkdir uploads
25
 
26
+ # Expose port for Streamlit (default 8501)
27
+ EXPOSE 8501
28
 
29
+ # Run Streamlit app (change this if using Flask)
30
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]