Spaces:
Sleeping
Sleeping
File size: 1,100 Bytes
afb623a cb49db4 a1b4b7e cb49db4 afb623a cb49db4 afb623a cb49db4 afb623a a1b4b7e cb49db4 afb623a c0cf317 cb49db4 afb623a be7bb59 071e8b9 afb623a 071e8b9 afb623a cb49db4 be7bb59 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# Base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app source code
COPY . .
# Create necessary folders with full permissions
RUN mkdir -p /app/.streamlit \
/app/.config/matplotlib \
/app/.cache \
/app/outputs \
&& chmod -R 777 /app/.streamlit \
/app/.config \
/app/.cache \
/app/outputs \
/tmp
# Copy Streamlit config
COPY .streamlit/config.toml /app/.streamlit/config.toml
# Set environment variable for Matplotlib to use writable directory
ENV MPLCONFIGDIR=/app/.config/matplotlib
# Expose Streamlit default port
EXPOSE 8501
# Start Streamlit with KPI_Dashboard.py as the main page
CMD ["streamlit", "run", "KPI_Dashboard.py", "--server.port=8501", "--server.address=0.0.0.0"] |