Spaces:
Sleeping
Sleeping
Adding config execution to Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -2,25 +2,26 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install OS-level dependencies (removed software-properties-common)
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# Copy dependency list and install
|
| 13 |
COPY requirements.txt ./
|
| 14 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
-
# Copy
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
EXPOSE 8501
|
| 21 |
|
| 22 |
-
# Healthcheck for Spaces
|
| 23 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 24 |
|
| 25 |
-
# Run your main app file
|
| 26 |
ENTRYPOINT ["streamlit", "run", "KPI_Dashboard.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
curl \
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
|
|
|
| 11 |
COPY requirements.txt ./
|
| 12 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Copy project files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
# Copy Streamlit config (make sure .streamlit exists in your project root)
|
| 18 |
+
COPY .streamlit .streamlit
|
| 19 |
+
|
| 20 |
+
# Optional: explicitly tell Streamlit where config is
|
| 21 |
+
ENV STREAMLIT_CONFIG_PATH=/app/.streamlit/config.toml
|
| 22 |
+
|
| 23 |
EXPOSE 8501
|
| 24 |
|
|
|
|
| 25 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 26 |
|
|
|
|
| 27 |
ENTRYPOINT ["streamlit", "run", "KPI_Dashboard.py", "--server.port=8501", "--server.address=0.0.0.0"]
|