undo: keep poetry-uv change limited to CI/CD fo now
This commit is contained in:
parent
3941e469e5
commit
4312508cf3
6 changed files with 26 additions and 18 deletions
|
|
@ -23,10 +23,10 @@ except ImportError as e:
|
||||||
print(
|
print(
|
||||||
"\nPlease install Cognee with optional gui dependencies or manually install missing dependencies.\n"
|
"\nPlease install Cognee with optional gui dependencies or manually install missing dependencies.\n"
|
||||||
)
|
)
|
||||||
print("\nTo install with uv use:")
|
print("\nTo install with poetry use:")
|
||||||
print("\nuv sync --extra gui\n")
|
print("\npoetry install -E gui\n")
|
||||||
print("\nOr to install with uv and all dependencies use:")
|
print("\nOr to install with poetry and all dependencies use:")
|
||||||
print("\nuv sync --all-extras\n")
|
print("\npoetry install --all-extras\n")
|
||||||
print("\nTo install with pip use: ")
|
print("\nTo install with pip use: ")
|
||||||
print('\npip install ".[gui]"\n')
|
print('\npip install ".[gui]"\n')
|
||||||
raise e
|
raise e
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ Open inspector with timeout passed:
|
||||||
|
|
||||||
To apply new changes while developing cognee you need to do:
|
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`
|
2. `uv sync --dev --all-extras --reinstall`
|
||||||
3. `mcp dev src/server.py`
|
3. `mcp dev src/server.py`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
# Define uv extras to install
|
# Define Poetry extras to install
|
||||||
ARG UV_EXTRAS="\
|
ARG POETRY_EXTRAS="\
|
||||||
# Storage & Databases \
|
# Storage & Databases \
|
||||||
postgres neo4j falkordb kuzu \
|
postgres neo4j falkordb kuzu \
|
||||||
# Notebooks & Interactive Environments \
|
# Notebooks & Interactive Environments \
|
||||||
|
|
@ -21,6 +21,7 @@ ARG DEBUG
|
||||||
# Set environment variable based on the build argument
|
# Set environment variable based on the build argument
|
||||||
ENV DEBUG=${DEBUG}
|
ENV DEBUG=${DEBUG}
|
||||||
ENV PIP_NO_CACHE_DIR=true
|
ENV PIP_NO_CACHE_DIR=true
|
||||||
|
ENV PATH="${PATH}:/root/.poetry/bin"
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get install -y \
|
RUN apt-get install -y \
|
||||||
|
|
@ -29,12 +30,16 @@ RUN apt-get install -y \
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY pyproject.toml uv.lock /app/
|
COPY pyproject.toml poetry.lock /app/
|
||||||
|
|
||||||
RUN pip install uv
|
|
||||||
|
|
||||||
# Install the dependencies with uv
|
RUN pip install poetry
|
||||||
RUN uv sync --no-dev
|
|
||||||
|
# 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
|
# Set the PYTHONPATH environment variable to include the /app directory
|
||||||
|
|
|
||||||
|
|
@ -26,5 +26,5 @@ sudo apt install -y python3.12
|
||||||
virtualenv venv --python=python3.12
|
virtualenv venv --python=python3.12
|
||||||
|
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
pip install uv
|
pip install poetry
|
||||||
uv sync
|
poetry install
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ FROM python:3.11-slim
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV PIP_NO_CACHE_DIR=true
|
ENV PIP_NO_CACHE_DIR=true
|
||||||
|
ENV PATH="${PATH}:/root/.poetry/bin"
|
||||||
ENV PYTHONPATH=/app
|
ENV PYTHONPATH=/app
|
||||||
ENV RUN_MODE=modal
|
ENV RUN_MODE=modal
|
||||||
ENV SKIP_MIGRATIONS=true
|
ENV SKIP_MIGRATIONS=true
|
||||||
|
|
@ -18,11 +19,13 @@ RUN apt-get update && apt-get install -y \
|
||||||
|
|
||||||
WORKDIR /app
|
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 cognee/ /app/cognee
|
||||||
COPY distributed/ /app/distributed
|
COPY distributed/ /app/distributed
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# File and string to search for
|
# File and string to search for
|
||||||
lockfile_name = "uv.lock"
|
lockfile_name = "poetry.lock"
|
||||||
hash_string = "hash = "
|
hash_string = "hash = "
|
||||||
threshold = 100
|
threshold = 100
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ try:
|
||||||
|
|
||||||
# If the loop completes without early exit, it means the threshold was not reached
|
# If the loop completes without early exit, it means the threshold was not reached
|
||||||
print(
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue