diff --git a/app/Dockerfile b/app/Dockerfile index 4f569f9..67f86ee 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -49,6 +49,4 @@ EXPOSE 5050 ENV FLASK_APP=app.py # Run the application using uWSGI -# CMD ["uwsgi", "--lazy-apps", "--http", "0.0.0.0:5050", "--wsgi-file", "app.py", "--callable", "app", "--processes", "4"] -# longer timeout settings to allow for slower rag and llm responses -CMD ["uwsgi", "--lazy-apps", "--http", "0.0.0.0:5050", "--wsgi-file", "app.py", "--callable", "app", "--processes", "4", "--harakiri", "300", "--socket-timeout", "300", "--http-timeout", "300", "--http-keepalive", "--http-auto-chunked"] +CMD ["uwsgi", "--lazy-apps", "--http", "0.0.0.0:5050", "--wsgi-file", "app.py", "--callable", "app", "--processes", "2"] diff --git a/app/test_rag_system.py b/app/test_rag_system.py index 15f15bf..e94af36 100644 --- a/app/test_rag_system.py +++ b/app/test_rag_system.py @@ -1,6 +1,5 @@ import unittest -from torch import cosine_similarity from rag_system import RAGSystem class TestRAGSystem(unittest.TestCase): diff --git a/compose.yaml b/compose.yaml index ffab5ff..2d4ab27 100644 --- a/compose.yaml +++ b/compose.yaml @@ -30,7 +30,7 @@ services: resources: reservations: memory: 4G - cpus: 2.0 + cpus: 1.0 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5050/"] interval: 30s