Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +22 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,26 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|