From 6c16dd02e51382c68809f38e905437b3732d23d0 Mon Sep 17 00:00:00 2001 From: Josh Bradley Date: Thu, 5 Dec 2024 14:31:10 -0500 Subject: [PATCH] fix install of venv environment when used with poetry --- .devcontainer/entrypoint.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.devcontainer/entrypoint.sh b/.devcontainer/entrypoint.sh index f9e9aae..5698236 100755 --- a/.devcontainer/entrypoint.sh +++ b/.devcontainer/entrypoint.sh @@ -10,9 +10,16 @@ sudo chmod 666 /var/run/docker.sock ################################ # Install graphrag dependencies +# NOTE: temporarily copy the pyproject.toml and poetry.lock files to the root directory to install dependencies. +# This avoids having a .venv folder in the backend directory, which causes PATH issues when building the +# backend docker image during deployment ROOT_DIR=/graphrag-accelerator cd ${ROOT_DIR} -poetry install --no-interaction -v --directory ${ROOT_DIR}/backend +cp ${ROOT_DIR}/backend/pyproject.toml ${ROOT_DIR} +cp ${ROOT_DIR}/backend/poetry.lock ${ROOT_DIR} +poetry install --no-interaction -v +rm ${ROOT_DIR}/pyproject.toml +rm ${ROOT_DIR}/poetry.lock ######################### ### Git configuration ###