Upload Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.12-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
COPY requirements.txt .
|
6 |
+
COPY app.py .
|
7 |
+
|
8 |
+
RUN pip install --upgrade pip
|
9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
+
|
11 |
+
RUN pip install gunicorn
|
12 |
+
|
13 |
+
EXPOSE 7860
|
14 |
+
|
15 |
+
CMD ["gunicorn", "app:app", \
|
16 |
+
"-w", "4", \
|
17 |
+
"--worker-class", "gevent", \
|
18 |
+
"--worker-connections", "100", \
|
19 |
+
"-b", "0.0.0.0:7860", \
|
20 |
+
"--timeout", "120", \
|
21 |
+
"--keep-alive", "5", \
|
22 |
+
"--max-requests", "1000", \
|
23 |
+
"--max-requests-jitter", "100"]
|