File size: 1,061 Bytes
b1d97e7
9893fb1
 
 
 
 
 
 
 
 
 
 
65501bb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
04d660b
65501bb
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.10

RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

COPY --chown=user . /app
# CMD ["gunicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]


# FROM python:3.10

# # Create a user for running the application
# RUN useradd -m -u 1000 user
# USER user
# ENV PATH="/home/user/.local/bin:$PATH"

# # Set the working directory for your app inside the container
# WORKDIR /app

# # Copy requirements.txt and install dependencies
# COPY --chown=user ./requirements.txt requirements.txt
# RUN pip install --no-cache-dir --upgrade -r requirements.txt

# # Install Hypercorn for Quart
# RUN pip install hypercorn

# # Copy the rest of the application files into the container
# COPY --chown=user . /app

# # Run the Quart app with Hypercorn, binding it to all interfaces on port 8000
# CMD ["hypercorn", "app:app", "--bind", "0.0.0.0:8000"]