# Dockerfile # Use Python 3.12 for guaranteed PyTorch compatibility FROM python:3.12-slim # Set the working directory inside the container WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ curl \ git \ && rm -rf /var/lib/apt/lists/* # Copy the requirements file FIRST to leverage Docker caching COPY requirements.txt ./ # Install Python dependencies (added --no-cache-dir to keep the image small) RUN pip3 install --no-cache-dir -r requirements.txt # Copy the rest of your project files (app.py, models/, frontend/, etc.) COPY . . # Expose Streamlit's default port EXPOSE 8501 # Healthcheck to ensure Streamlit is running HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health # Boot the Streamlit app ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]