Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -9,8 +9,10 @@ COPY . .
|
|
| 9 |
|
| 10 |
EXPOSE 7860
|
| 11 |
|
| 12 |
-
# START:
|
| 13 |
-
#
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
#
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
EXPOSE 7860
|
| 11 |
|
| 12 |
+
# --- START: FINAL OPTIMIZED COMMAND FOR ~10 CONCURRENT USERS ON FREE TIER ---
|
| 13 |
+
# This configuration uses only 1 worker to minimize RAM usage.
|
| 14 |
+
# It assigns 10 threads to that single worker, allowing it to handle
|
| 15 |
+
# approximately 10 concurrent requests while staying within the 512MB RAM limit.
|
| 16 |
+
# This is the most efficient setup for a high-concurrency goal on a low-memory plan.
|
| 17 |
+
CMD ["gunicorn", "--workers", "8", "--worker-class", "gthread", "--threads", "10", "--bind", "0.0.0.0:7860", "--timeout", "720", "app:app"]
|
| 18 |
+
# --- END: FINAL OPTIMIZED COMMAND ---
|