Spaces:
Sleeping
Sleeping
Upload dockerfile
Browse files- dockerfile +29 -0
dockerfile
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Base image with Python 3.10
|
2 |
+
FROM python:3.10.14
|
3 |
+
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install system dependencies (including Poppler)
|
8 |
+
RUN apt-get update && \
|
9 |
+
apt-get install -y poppler-utils && \
|
10 |
+
apt-get clean && \
|
11 |
+
rm -rf /var/lib/apt/lists/*
|
12 |
+
|
13 |
+
# Copy requirements.txt first to leverage Docker cache
|
14 |
+
COPY requirements.txt .
|
15 |
+
|
16 |
+
# Install Python dependencies
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
+
|
19 |
+
# Copy the rest of the app code to the container
|
20 |
+
COPY . .
|
21 |
+
|
22 |
+
# Expose Streamlit's default port (8501)
|
23 |
+
EXPOSE 8501
|
24 |
+
|
25 |
+
# Set environment variables (You can modify this to load variables from Hugging Face Secrets)
|
26 |
+
ENV STREAMLIT_SERVER_PORT=8501
|
27 |
+
|
28 |
+
# Command to run the Streamlit app
|
29 |
+
CMD ["streamlit", "run", "app.py"]
|