Alexvatti commited on
Commit
2f1a090
·
verified ·
1 Parent(s): a87bf1f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -6
Dockerfile CHANGED
@@ -1,11 +1,27 @@
1
- FROM python:3.10
 
2
 
3
- RUN apt-get update && apt-get install -y poppler-utils
 
 
 
 
 
 
 
 
4
 
 
5
  COPY requirements.txt .
6
- RUN pip install -r requirements.txt
7
 
8
- COPY . /app
9
- WORKDIR /app
 
 
 
 
 
 
10
 
11
- CMD ["streamlit", "run", "app.py"]
 
 
1
+ # Base image with Python and Debian
2
+ FROM python:3.10-slim
3
 
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ tesseract-ocr \
10
+ libgl1 \
11
+ poppler-utils \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Copy requirements (adjust if using pipenv/poetry)
15
  COPY requirements.txt .
 
16
 
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy app code
21
+ COPY . .
22
+
23
+ # Expose Streamlit port
24
+ EXPOSE 7860
25
 
26
+ # Run the app
27
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]