File size: 605 Bytes
28fe578
 
cc46626
28fe578
cc46626
 
093664e
 
cc46626
093664e
ceb700b
cc46626
28fe578
b1157d1
d5a1541
28fe578
ceb700b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Use a lightweight Python base image
FROM python:3.9-slim-buster

## 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
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt

# Expose the port that the Flask app will run on
EXPOSE 7860

# Define the command to run the Flask application using gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--log-file", "-", "--access-logfile", "-", "app:predict_sales_api"]