AzizWazir commited on
Commit
09d5106
·
verified ·
1 Parent(s): a3d2e55

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -6
Dockerfile CHANGED
@@ -1,10 +1,26 @@
1
- FROM python:3.10
 
2
 
3
- WORKDIR /app
 
 
 
 
 
 
 
4
 
5
- COPY requirements.txt .
6
- RUN pip install -r requirements.txt
7
 
8
- COPY . .
 
9
 
10
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
1
+ # Use a Python 3.10 base image
2
+ FROM python:3.10-slim
3
 
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ tesseract-ocr \
7
+ poppler-utils \
8
+ libsm6 \
9
+ libxext6 \
10
+ libgl1-mesa-glx \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Set the working directory
14
+ WORKDIR /home/user/app
15
 
16
+ # Copy the application files
17
+ COPY . /home/user/app
18
 
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Expose the port Streamlit will run on
23
+ EXPOSE 8501
24
+
25
+ # Run the Streamlit app
26
+ CMD ["streamlit", "run", "app.py"]