Spaces:
Runtime error
Runtime error
File size: 557 Bytes
2d85bfe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 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"]
|