From 2780d00fb8e0b17441e0f519c29bfe1b78505a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Dvo=C5=99=C3=A1k?= Date: Thu, 2 Jan 2025 15:55:48 +0100 Subject: [PATCH] fix(workers): add installation command, update pyproject (#146) --- package.json | 3 ++- workers/python/Dockerfile.docling | 2 +- workers/python/Dockerfile.unstructured | 2 +- workers/python/pyproject.toml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7f979ba..2522784 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "start:dev:nowatch": "tsx src/server.ts | pino-pretty --singleLine", "start:dev:workers": "concurrently npm:start:dev:workers:*", "start:dev:workers:node": "tsx watch workers/node/main.ts | pino-pretty --singleLine", - "start:dev:workers:python": "bash -c 'cd workers/python && poetry run python python/main.py'", + "start:dev:workers:python": "bash -c 'cd workers/python && PORT=7777 poetry run python python/main.py'", + "install:workers:python": "bash -c 'cd workers/python && poetry install --no-root --all-extras --with docling --with unstructured'", "test:e2e": "vitest run tests/e2e", "test:e2e:watch": "vitest watch tests/e2e", "mikro-orm": "NODE_OPTIONS='--import tsx' mikro-orm --config ./src/mikro-orm.config.ts", diff --git a/workers/python/Dockerfile.docling b/workers/python/Dockerfile.docling index c3e2884..08ae829 100644 --- a/workers/python/Dockerfile.docling +++ b/workers/python/Dockerfile.docling @@ -31,7 +31,7 @@ ENV PYTHONUNBUFFERED=1 \ \ # poetry # https://python-poetry.org/docs/configuration/#using-environment-variables - POETRY_VERSION=1.8.3 \ + POETRY_VERSION=1.8.5 \ # make poetry create the virtual environment in the project's root # it gets named `.venv` POETRY_VIRTUALENVS_IN_PROJECT=true \ diff --git a/workers/python/Dockerfile.unstructured b/workers/python/Dockerfile.unstructured index 9dcac63..a2b3327 100644 --- a/workers/python/Dockerfile.unstructured +++ b/workers/python/Dockerfile.unstructured @@ -16,7 +16,7 @@ ENV PYTHONUNBUFFERED=1 \ \ # poetry # https://python-poetry.org/docs/configuration/#using-environment-variables - POETRY_VERSION=1.8.3 \ + POETRY_VERSION=1.8.5 \ # make poetry create the virtual environment in the project's root # it gets named `.venv` POETRY_VIRTUALENVS_IN_PROJECT=true \ diff --git a/workers/python/pyproject.toml b/workers/python/pyproject.toml index f2c8943..94d16e0 100644 --- a/workers/python/pyproject.toml +++ b/workers/python/pyproject.toml @@ -29,5 +29,5 @@ unstructured-ingest = {extras = ["s3"], version = "^0.3.8"} unstructured = {extras = ["all-docs"], version = "^0.16.11"} [build-system] -requires = ["poetry-core"] +requires = ["poetry-core>=1.8.0"] build-backend = "poetry.core.masonry.api"