diff --git a/cognee-gui.py b/cognee-gui.py index d08d31529..e62a08380 100644 --- a/cognee-gui.py +++ b/cognee-gui.py @@ -23,10 +23,10 @@ except ImportError as e: print( "\nPlease install Cognee with optional gui dependencies or manually install missing dependencies.\n" ) - print("\nTo install with uv use:") - print("\nuv sync --extra gui\n") - print("\nOr to install with uv and all dependencies use:") - print("\nuv sync --all-extras\n") + print("\nTo install with poetry use:") + print("\npoetry install -E gui\n") + print("\nOr to install with poetry and all dependencies use:") + print("\npoetry install --all-extras\n") print("\nTo install with pip use: ") print('\npip install ".[gui]"\n') raise e diff --git a/cognee-mcp/README.md b/cognee-mcp/README.md index ecb7a0f4b..ffd46dd6e 100644 --- a/cognee-mcp/README.md +++ b/cognee-mcp/README.md @@ -211,7 +211,7 @@ Open inspector with timeout passed: To apply new changes while developing cognee you need to do: -1. `uv lock` in cognee folder +1. `poetry lock` in cognee folder 2. `uv sync --dev --all-extras --reinstall` 3. `mcp dev src/server.py` diff --git a/deployment/helm/Dockerfile b/deployment/helm/Dockerfile index e6cdc81f0..3f9ec7740 100644 --- a/deployment/helm/Dockerfile +++ b/deployment/helm/Dockerfile @@ -1,7 +1,7 @@ FROM python:3.11-slim -# Define uv extras to install -ARG UV_EXTRAS="\ +# Define Poetry extras to install +ARG POETRY_EXTRAS="\ # Storage & Databases \ postgres neo4j falkordb kuzu \ # Notebooks & Interactive Environments \ @@ -21,6 +21,7 @@ ARG DEBUG # Set environment variable based on the build argument ENV DEBUG=${DEBUG} ENV PIP_NO_CACHE_DIR=true +ENV PATH="${PATH}:/root/.poetry/bin" RUN apt-get install -y \ @@ -29,12 +30,16 @@ RUN apt-get install -y \ WORKDIR /app -COPY pyproject.toml uv.lock /app/ +COPY pyproject.toml poetry.lock /app/ -RUN pip install uv -# Install the dependencies with uv -RUN uv sync --no-dev +RUN pip install poetry + +# Don't create virtualenv since docker is already isolated +RUN poetry config virtualenvs.create false + +# Install the dependencies +RUN poetry install --extras "${POETRY_EXTRAS}" --no-root --without dev # Set the PYTHONPATH environment variable to include the /app directory diff --git a/deployment/setup_ubuntu_instance.sh b/deployment/setup_ubuntu_instance.sh index c54e8f3f2..854cd1c9f 100644 --- a/deployment/setup_ubuntu_instance.sh +++ b/deployment/setup_ubuntu_instance.sh @@ -26,5 +26,5 @@ sudo apt install -y python3.12 virtualenv venv --python=python3.12 source venv/bin/activate -pip install uv -uv sync +pip install poetry +poetry install diff --git a/distributed/Dockerfile b/distributed/Dockerfile index 6a5fb0ccb..6ac818d45 100644 --- a/distributed/Dockerfile +++ b/distributed/Dockerfile @@ -2,6 +2,7 @@ FROM python:3.11-slim # Set environment variables ENV PIP_NO_CACHE_DIR=true +ENV PATH="${PATH}:/root/.poetry/bin" ENV PYTHONPATH=/app ENV RUN_MODE=modal ENV SKIP_MIGRATIONS=true @@ -18,11 +19,13 @@ RUN apt-get update && apt-get install -y \ WORKDIR /app -COPY pyproject.toml uv.lock README.md /app/ +COPY pyproject.toml poetry.lock README.md /app/ -RUN pip install uv +RUN pip install poetry -RUN uv sync --extra neo4j --extra postgres --extra aws --extra distributed --no-dev +RUN poetry config virtualenvs.create false + +RUN poetry install --extras neo4j --extras postgres --extras aws --extras distributed --no-root COPY cognee/ /app/cognee COPY distributed/ /app/distributed diff --git a/tools/check-lockfile.py b/tools/check-lockfile.py index 39bea1165..df60b35ac 100644 --- a/tools/check-lockfile.py +++ b/tools/check-lockfile.py @@ -1,7 +1,7 @@ import sys # File and string to search for -lockfile_name = "uv.lock" +lockfile_name = "poetry.lock" hash_string = "hash = " threshold = 100 @@ -19,7 +19,7 @@ try: # If the loop completes without early exit, it means the threshold was not reached print( - f"Error: The string '{hash_string}' appears less than {threshold} times in {lockfile_name}, please make sure you are using an up to date uv version." + f"Error: The string '{hash_string}' appears less than {threshold} times in {lockfile_name}, please make sure you are using an up to date poetry version." ) sys.exit(1)