Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -11
Dockerfile
CHANGED
|
@@ -1,18 +1,17 @@
|
|
| 1 |
-
# Use
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
-
COPY
|
| 9 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
|
| 13 |
|
| 14 |
-
# Expose
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
-
# Run
|
| 18 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use Python base image
|
| 2 |
+
FROM python:3.9
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy current files into container
|
| 8 |
+
COPY . /app
|
|
|
|
| 9 |
|
| 10 |
+
# Install Flask
|
| 11 |
+
RUN pip install -r requirements.txt
|
| 12 |
|
| 13 |
+
# Expose default port
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
+
# Run with Gunicorn
|
| 17 |
+
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "bot_with_api:app"]
|