File size: 527 Bytes
9864782
 
9164962
9864782
 
9164962
9864782
 
f12a1f3
 
 
9864782
9164962
9864782
 
9164962
9864782
 
 
 
9164962
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.9-slim

# Set working directory
WORKDIR /app

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

# Install Gunicorn and your application dependencies
RUN pip install --no-cache-dir gunicorn && \
    pip install --no-cache-dir -r requirements.txt

# Expose the port Gunicorn will listen on
EXPOSE 7860

# Define environment variables
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=7860

# Run the Gunicorn server
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]