# Use Python 3.11 slim image for smaller size FROM python:3.11-slim # Set working directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ gcc \ g++ \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Install additional dependencies for Hugging Face datasets RUN pip install --no-cache-dir datasets huggingface_hub # Copy all application files COPY . . # Expose port EXPOSE 8501 # Set environment variables ENV PYTHONPATH=/app ENV STREAMLIT_SERVER_PORT=8501 ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 # Force light theme ENV STREAMLIT_THEME_BASE=light ENV STREAMLIT_THEME_PRIMARY_COLOR=#CFB991 ENV STREAMLIT_THEME_BACKGROUND_COLOR=#FAF9F7 ENV STREAMLIT_THEME_SECONDARY_BACKGROUND_COLOR=#FFFFFF ENV STREAMLIT_THEME_TEXT_COLOR=#0F172A ENV STREAMLIT_CLIENT_SHOW_SIDEBAR_NAVIGATION=false # Health check HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health # Run the app + background scheduler CMD ["bash", "start.sh"]