SuperKartBackend / Dockerfile
HumanMachine74's picture
Upload Dockerfile with huggingface_hub
b5aaa24 verified
raw
history blame contribute delete
784 Bytes
# 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 all files from the current directory on the host to the container's /app directory
COPY . .
# Install Python dependencies listed in requirements.txt
# Include gunicorn as a dependency to run the Flask app
RUN pip3 install -r requirements.txt gunicorn
# Define the command to run the Flask application using Gunicorn
# 'app:SuperKart_predictions_api' specifies the module (app.py) and the Flask app instance name (SuperKart_predictions_api)
# -b 0.0.0.0:7860 binds Gunicorn to all network interfaces on port 7860 (default for Hugging Face Spaces Docker SDK)
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:SuperKart_predictions_api"]