Spaces:
Running
Running
Upload 2 files
Browse files- Dockerfile +6 -1
- requirements.txt +1 -0
Dockerfile
CHANGED
|
@@ -38,4 +38,9 @@ ENV HOME=/home/user \
|
|
| 38 |
|
| 39 |
# 6. Run the App
|
| 40 |
EXPOSE 7860
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# 6. Run the App
|
| 40 |
EXPOSE 7860
|
| 41 |
+
# Single worker (the app keeps per-user progress/log/task state in plain
|
| 42 |
+
# in-process dicts — see src/state.py — so multiple worker *processes*
|
| 43 |
+
# would each see a different, inconsistent copy of that state). Multiple
|
| 44 |
+
# threads still give real concurrency for I/O-bound requests instead of
|
| 45 |
+
# the Werkzeug dev server's single-request-at-a-time behavior.
|
| 46 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "8", "--timeout", "120", "app:app"]
|
requirements.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
flask
|
|
|
|
| 2 |
firebase-admin
|
| 3 |
requests
|
| 4 |
pandas
|
|
|
|
| 1 |
flask
|
| 2 |
+
flask-wtf
|
| 3 |
firebase-admin
|
| 4 |
requests
|
| 5 |
pandas
|