Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as the base image
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Install system dependencies for Tesseract and OpenCV
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
tesseract-ocr \
|
7 |
+
tesseract-ocr-eng \
|
8 |
+
tesseract-ocr-urd \
|
9 |
+
libgl1 \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Set the Tesseract data path
|
13 |
+
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata
|
14 |
+
|
15 |
+
# Install Python dependencies
|
16 |
+
COPY requirements.txt .
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
+
|
19 |
+
# Copy the application code
|
20 |
+
COPY . .
|
21 |
+
|
22 |
+
# Expose the port for Streamlit
|
23 |
+
EXPOSE 8501
|
24 |
+
|
25 |
+
# Run the Streamlit app
|
26 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|