From 7686dabd3633160649ced03283954a9974aea2ab Mon Sep 17 00:00:00 2001 From: Nolan Date: Sun, 23 Jul 2023 19:33:47 -0700 Subject: [PATCH] Unbreak devcontainer (#8154) Codespaces and devcontainer was broken by the [repo restructure](https://github.com/langchain-ai/langchain/discussions/8043). - Description: Add libs/langchain to container so it can be built without error. - Issue: - - Dependencies: - - Tag maintainer: @hwchase17 @baskaryan - Twitter handle: @finnless The failed build log says: ``` #10 [langchain-dev-dependencies 2/2] RUN poetry install --no-interaction --no-ansi --with dev,test,docs #10 sha256:e850ee99fc966158bfd2d85e82b7c57244f47ecbb1462e75bd83b981a56a1929 2023-07-23 23:30:33.692Z: #10 0.827 #10 0.827 Directory libs/langchain does not exist 2023-07-23 23:30:33.738Z: #10 ERROR: executor failed running [/bin/sh -c poetry install --no-interaction --no-ansi --with dev,test,docs]: exit code: 1 ``` The new pyproject.toml imports from libs/langchain: https://github.com/langchain-ai/langchain/blob/77bf75c236351edf47d3a76a522bb45ccc90d299/pyproject.toml#L14-L16 But libs/langchain is never added to the dev.Dockerfile: https://github.com/langchain-ai/langchain/blob/77bf75c236351edf47d3a76a522bb45ccc90d299/libs/langchain/dev.Dockerfile#L37-L39 --- libs/langchain/dev.Dockerfile | 3 +++ poetry.toml | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 poetry.toml diff --git a/libs/langchain/dev.Dockerfile b/libs/langchain/dev.Dockerfile index 4383ecc895..3e07a676f1 100644 --- a/libs/langchain/dev.Dockerfile +++ b/libs/langchain/dev.Dockerfile @@ -37,5 +37,8 @@ ARG PYTHON_VIRTUALENV_HOME # Copy only the dependency files for installation COPY pyproject.toml poetry.toml ./ +# Copy the langchain library for installation +COPY libs/langchain/ libs/langchain/ + # Install the Poetry dependencies (this layer will be cached as long as the dependencies don't change) RUN poetry install --no-interaction --no-ansi --with dev,test,docs \ No newline at end of file diff --git a/poetry.toml b/poetry.toml new file mode 100644 index 0000000000..42159b2479 --- /dev/null +++ b/poetry.toml @@ -0,0 +1,5 @@ +[virtualenvs] +in-project = true + +[installer] +modern-installation = false