File size: 639 Bytes
5fc6306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
04b24c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.9-slim

# Set working directory
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . .

# Install dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Define the command to start the application using Gunicorn with 4 worker Product_Store_Sales_Total
# - `-w 4`: Uses 4 worker processes for handling requests
# - `-b 0.0.0.0:7860`: Binds the server to port 7860 on all network interfaces
# - `app:app`: Runs the Flask app (assuming `app.py` contains the Flask instance named `app`)
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:Superkart_Sales_Predictor_API"]