FROM python:3.10-slim WORKDIR /app # Environment variables ENV HOME=/app \ PYTHONUNBUFFERED=1 # Create .streamlit directory RUN mkdir -p /app/.streamlit # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ curl \ git \ && rm -rf /var/lib/apt/lists/* # Copy requirements first (for caching layers) COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy all project files (since not in src/) COPY . . EXPOSE 8501 # Healthcheck HEALTHCHECK CMD curl --silent --fail http://localhost:8501/_stcore/health || exit 1 # Replace "app.py" with your actual Streamlit main file ENTRYPOINT ["streamlit", "run", "Home.py", "--server.port=8501", "--server.address=0.0.0.0"]