FROM python:3.9-slim # Set the working directory WORKDIR /app # Install necessary system dependencies RUN apt-get update && apt-get install -y \ curl \ software-properties-common \ git \ && rm -rf /var/lib/apt/lists/* # Copy requirements and application files COPY requirements.txt ./ COPY *.py ./ # Install Python dependencies RUN pip3 install -r requirements.txt # Expose Streamlit's default port EXPOSE 8501 # Health check to ensure the application is running properly HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 # Set the Streamlit startup command ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]