File size: 598 Bytes
0d477f2
b133a56
 
0d477f2
b133a56
 
0d477f2
b133a56
 
0d477f2
b133a56
 
0d477f2
b133a56
 
0d477f2
b133a56
 
0d477f2
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Use Python 3.9 as the base image
FROM python:3.9

# Set the working directory to /code
WORKDIR /code

# Copy the requirements.txt file to the container
COPY ./requirements.txt /code/requirements.txt

# Install Python dependencies from requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the rest of the files from the current directory to the container
COPY . .

# Expose port 7860
EXPOSE 7860

# Set up Flask-specific configurations
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=7860

# Run the Flask application
CMD ["flask", "run"]