diff --git a/.images/ER.png b/.images/ER.png new file mode 100644 index 0000000..1690343 Binary files /dev/null and b/.images/ER.png differ diff --git a/Containerfile b/Containerfile index 261f41e..d3dec05 100644 --- a/Containerfile +++ b/Containerfile @@ -36,6 +36,8 @@ COPY ./src ./src RUN uv sync --frozen --no-dev --no-cache --group ml +RUN uv add prometheus-fastapi-instrumentator + # Stage 4: Backend Runtime FROM ${PY_IMAGE} AS runtime diff --git a/pyproject.toml b/pyproject.toml index 6c2cb1c..f1223b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ dependencies = [ "levenshtein>=0.27.3", "adaptix==3.0.0b11", "markupsafe", - "prometheus-fastapi-instrumentator>=7.1.0", ] [dependency-groups] @@ -26,10 +25,12 @@ backend = [ "aioboto3==15.5.0", "python-multipart>=0.0.20", "pgvector>=0.4.1", + "prometheus-fastapi-instrumentator>=7.1.0", ] ml = [ "sentence-transformers>=5.1.2", "torch", + "prometheus-fastapi-instrumentator>=7.1.0", ] types = [ "types-cachetools==6.2.0.20250827", diff --git a/uv.lock b/uv.lock index b71ac33..6d06a66 100644 --- a/uv.lock +++ b/uv.lock @@ -2406,6 +2406,7 @@ dependencies = [ { name = "fastapi" }, { name = "levenshtein" }, { name = "markupsafe" }, + { name = "prometheus-fastapi-instrumentator" }, { name = "pydantic", extra = ["email"] }, { name = "uuid-utils" }, { name = "uvicorn" }, @@ -2419,7 +2420,6 @@ backend = [ { name = "firebase-admin" }, { name = "httpx" }, { name = "pgvector" }, - { name = "prometheus-fastapi-instrumentator" }, { name = "psycopg", extra = ["binary"] }, { name = "python-multipart" }, { name = "sqlalchemy" }, @@ -2460,6 +2460,7 @@ migrations = [ { name = "alembic" }, ] ml = [ + { name = "prometheus-fastapi-instrumentator" }, { name = "sentence-transformers" }, { name = "torch", version = "2.2.2", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(python_full_version < '3.13' and platform_machine == 'aarch64' and platform_python_implementation == 'CPython' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform == 'darwin')" }, { name = "torch", version = "2.2.2+cpu", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(python_full_version >= '3.13' and sys_platform == 'darwin') or (python_full_version >= '3.13' and sys_platform == 'linux') or (platform_machine != 'aarch64' and sys_platform == 'linux') or (platform_python_implementation != 'CPython' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" }, @@ -2481,6 +2482,7 @@ requires-dist = [ { name = "fastapi", specifier = "==0.119.0" }, { name = "levenshtein", specifier = ">=0.27.3" }, { name = "markupsafe", git = "https://github.com/pallets/markupsafe?rev=3.0.2" }, + { name = "prometheus-fastapi-instrumentator", specifier = ">=7.1.0" }, { name = "pydantic", extras = ["email"], specifier = ">=2.12.4" }, { name = "uuid-utils", specifier = "==0.11.1" }, { name = "uvicorn", specifier = "==0.37.0" }, @@ -2494,7 +2496,6 @@ backend = [ { name = "firebase-admin", specifier = ">=7.1.0" }, { name = "httpx", specifier = "==0.28.1" }, { name = "pgvector", specifier = ">=0.4.1" }, - { name = "prometheus-fastapi-instrumentator", specifier = ">=7.1.0" }, { name = "psycopg", extras = ["binary"], specifier = ">=3.2.12" }, { name = "python-multipart", specifier = ">=0.0.20" }, { name = "sqlalchemy", specifier = "==2.0.44" }, @@ -2532,6 +2533,7 @@ linters = [ ] migrations = [{ name = "alembic", specifier = "==1.17.0" }] ml = [ + { name = "prometheus-fastapi-instrumentator", specifier = ">=7.1.0" }, { name = "sentence-transformers", specifier = ">=5.1.2" }, { name = "torch", index = "https://download.pytorch.org/whl/cpu" }, ]