From 334506b298eca76b8f28989d851a50c76950a04a Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:22:16 +0100 Subject: [PATCH] fix: fixes modal deprecation warnings --- modal_deployment.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modal_deployment.py b/modal_deployment.py index 3975a1ef2..adec8e6e2 100644 --- a/modal_deployment.py +++ b/modal_deployment.py @@ -12,15 +12,16 @@ app = modal.App("cognee-runner") image = ( modal.Image.from_dockerfile(path="Dockerfile_modal", force_build=False) - .copy_local_file("pyproject.toml", "pyproject.toml") - .copy_local_file("poetry.lock", "poetry.lock") + .add_local_file("pyproject.toml", remote_path="/root/pyproject.toml", copy=True) + .add_local_file("poetry.lock", remote_path="/root/poetry.lock", copy=True) .env({"ENV": os.getenv("ENV"), "LLM_API_KEY": os.getenv("LLM_API_KEY")}) .poetry_install_from_file(poetry_pyproject_toml="pyproject.toml") .pip_install("protobuf", "h2") + .add_local_python_source("cognee") ) -@app.function(image=image, concurrency_limit=10) +@app.function(image=image, max_containers=4) async def entry(text: str, query: str): setup_logging(logging.ERROR) await cognee.prune.prune_data()