File size: 733 Bytes
636922f
 
 
 
 
 
 
 
 
6a45c5c
ac17629
636922f
 
 
 
 
a4bf995
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM python:3.11.7-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
RUN pip install --no-cache-dir --upgrade pip \
    && pip install --no-cache-dir -r requirements.txt

#Define the command to run the Flask application on port 7860 and make it accessible externally
# - '-w 4' : Uses 4 worker processes to handle requests.
# - '-b 0.0.0.0:7860': Binds the Flask app to the specified host and port.
# - 'app:sales_prediction_api': Specifies the entry point of the Flask app.
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:sales_prediction_api"]