Spaces:
Runtime error
Runtime error
| # Lightweight Python base image | |
| FROM python:3.10-slim | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy dependency file first (leverages Docker layer caching) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the backend files (app.py, superkart_model.joblib) | |
| COPY . . | |
| # Expose the port Flask/gunicorn will run on | |
| EXPOSE 7860 | |
| # Start the Flask API using gunicorn (production-ready WSGI server) | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:superkart_api"] | |