GoodML commited on
Commit
9893fb1
·
verified ·
1 Parent(s): 20b2044

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -25
Dockerfile CHANGED
@@ -1,38 +1,38 @@
1
- FROM python:3.9
2
-
3
- RUN useradd -m -u 1000 user
4
- USER user
5
- ENV PATH="/home/user/.local/bin:$PATH"
6
-
7
- WORKDIR /app
8
-
9
- COPY --chown=user ./requirements.txt requirements.txt
10
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
-
12
- COPY --chown=user . /app
13
- # CMD ["gunicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
14
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
15
-
16
-
17
  # FROM python:3.9
18
 
19
- # # Create a user for running the application
20
  # RUN useradd -m -u 1000 user
21
  # USER user
22
  # ENV PATH="/home/user/.local/bin:$PATH"
23
 
24
- # # Set the working directory for your app inside the container
25
  # WORKDIR /app
26
 
27
- # # Copy requirements.txt and install dependencies
28
  # COPY --chown=user ./requirements.txt requirements.txt
29
  # RUN pip install --no-cache-dir --upgrade -r requirements.txt
30
 
31
- # # Install Hypercorn for Quart
32
- # RUN pip install hypercorn
33
-
34
- # # Copy the rest of the application files into the container
35
  # COPY --chown=user . /app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- # # Run the Quart app with Hypercorn, binding it to all interfaces on port 8000
38
- # CMD ["hypercorn", "app:app", "--bind", "0.0.0.0:8000"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # FROM python:3.9
2
 
 
3
  # RUN useradd -m -u 1000 user
4
  # USER user
5
  # ENV PATH="/home/user/.local/bin:$PATH"
6
 
 
7
  # WORKDIR /app
8
 
 
9
  # COPY --chown=user ./requirements.txt requirements.txt
10
  # RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
 
 
 
 
 
12
  # COPY --chown=user . /app
13
+ # # CMD ["gunicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
14
+ # CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
15
+
16
+
17
+ FROM python:3.9
18
+
19
+ # Create a user for running the application
20
+ RUN useradd -m -u 1000 user
21
+ USER user
22
+ ENV PATH="/home/user/.local/bin:$PATH"
23
+
24
+ # Set the working directory for your app inside the container
25
+ WORKDIR /app
26
+
27
+ # Copy requirements.txt and install dependencies
28
+ COPY --chown=user ./requirements.txt requirements.txt
29
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
30
+
31
+ # Install Hypercorn for Quart
32
+ RUN pip install hypercorn
33
+
34
+ # Copy the rest of the application files into the container
35
+ COPY --chown=user . /app
36
 
37
+ # Run the Quart app with Hypercorn, binding it to all interfaces on port 8000
38
+ CMD ["hypercorn", "app:app", "--bind", "0.0.0.0:8000"]