# Use Python 3.11 (compatible with TF 2.15) FROM python:3.11-slim # Set working directory WORKDIR /app # Copy all code to container COPY . /app # Upgrade pip and install dependencies RUN pip install --upgrade pip RUN pip install -r requirements.txt # Expose HF Spaces default port EXPOSE 7860 # Set Flask environment variables ENV FLASK_APP=app.py ENV FLASK_RUN_HOST=0.0.0.0 ENV FLASK_RUN_PORT=7860 # Run Flask CMD ["flask", "run"]