diff --git a/backend/Dockerfile.backend b/backend/Dockerfile.backend index 712a6eb1..cd7e7d8c 100644 --- a/backend/Dockerfile.backend +++ b/backend/Dockerfile.backend @@ -52,7 +52,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # Clean up system Python installation RUN find /usr/local -name "*.pyc" -delete && \ find /usr/local -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true && \ - find /usr/local -name "tests" -type d -exec rm -rf {} + 2>/dev/null || true && \ + find /usr/local -name "tests" -type d ! -path "*/numpy/*" -exec rm -rf {} + 2>/dev/null || true && \ find /usr/local -name "*.egg-info" -type d -exec rm -rf {} + 2>/dev/null || true # Final stage - clean runtime diff --git a/poetry.lock b/poetry.lock index 34553d74..171d6cfc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -7681,6 +7681,7 @@ filelock = "*" huggingface-hub = ">=0.34.0,<1.0" numpy = ">=1.17" packaging = ">=20.0" +Pillow = {version = ">=10.0.1,<=15.0", optional = true, markers = "extra == \"vision\""} pyyaml = ">=5.1" regex = "!=2019.12.17" requests = "*" @@ -8409,4 +8410,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.12,<3.13" -content-hash = "5405e4177a64674b506d5ab663dc5d5b5bbe0425e13a1e156a4c506beb1b43d0" +content-hash = "d0bf5b1322717aa95d606ffcf094ee3607ae20799f49a34d7ffa0acd4c455968" diff --git a/pyproject.toml b/pyproject.toml index c1b779db..77313765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ "validators>=0.34.0", "psutil (>=7.0.0,<8.0.0)", "docling (>=2.0.0)", - "transformers (>=4.46.0)", + "transformers[vision] (>=4.46.0)", "pydub (>=0.25.1,<0.26.0)", "uuid-extension (>=0.2.0,<0.3.0)", "spacy (>=3.7.0,<4.0.0)",