# Use a minimal base image with Python 3.9 installed FROM python:3.9-slim # Set the working directory inside the container to /app WORKDIR /app # Copy the backend files into the container COPY app.py . COPY requirements.txt . COPY xgboost_model.joblib . COPY scaler.joblib . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose the port the Flask app will run on EXPOSE 5000 # Command to run the Flask application using Gunicorn, run as a module with increased timeout CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "--timeout", "120", "app:app"]