Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +22 -6
Dockerfile
CHANGED
|
@@ -1,11 +1,27 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
-
RUN pip install -r requirements.txt
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
| 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"]
|