From dcfd9c0e04595bf0d19b5b45b1941d6404038901 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Mon, 29 Dec 2025 18:10:40 -0600 Subject: [PATCH] fix(infra): use `langchain_v1` for dev container deps (#34534) --- .devcontainer/devcontainer.json | 4 ++-- libs/langchain/dev.Dockerfile | 4 +++- libs/langchain_v1/uv.lock | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e23c37e26fe..e4557d6c892 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,7 +26,7 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], // Run commands after the container is created - "postCreateCommand": "uv sync && echo 'LangChain (Python) dev environment ready!'", + "postCreateCommand": "cd libs/langchain_v1 && uv sync && echo 'LangChain (Python) dev environment ready!'", // Configure tool-specific properties. "customizations": { "vscode": { @@ -42,7 +42,7 @@ "GitHub.copilot-chat" ], "settings": { - "python.defaultInterpreterPath": ".venv/bin/python", + "python.defaultInterpreterPath": "libs/langchain_v1/.venv/bin/python", "python.formatting.provider": "none", "[python]": { "editor.formatOnSave": true, diff --git a/libs/langchain/dev.Dockerfile b/libs/langchain/dev.Dockerfile index ec0c297cdc3..941f16c9920 100644 --- a/libs/langchain/dev.Dockerfile +++ b/libs/langchain/dev.Dockerfile @@ -28,7 +28,9 @@ COPY . . RUN mkdir -p $UV_CACHE_DIR && chmod 755 $UV_CACHE_DIR # Install dependencies using uv (let uv handle the venv creation) +WORKDIR /workspaces/langchain/libs/langchain_v1 RUN uv sync --dev +WORKDIR /workspaces/langchain # Create a non-root user and set up proper permissions RUN useradd -m -s /bin/bash -u 1000 vscode && \ @@ -38,4 +40,4 @@ USER vscode # Set shell for interactive use SHELL ["/bin/bash", "-c"] -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] diff --git a/libs/langchain_v1/uv.lock b/libs/langchain_v1/uv.lock index 6fe4c0b1b40..c8765dca4c8 100644 --- a/libs/langchain_v1/uv.lock +++ b/libs/langchain_v1/uv.lock @@ -2424,7 +2424,7 @@ test-integration = [ { name = "nltk", specifier = ">=3.9.1,<4.0.0" }, { name = "scipy", marker = "python_full_version == '3.12.*'", specifier = ">=1.7.0,<2.0.0" }, { name = "scipy", marker = "python_full_version >= '3.13'", specifier = ">=1.14.1,<2.0.0" }, - { name = "sentence-transformers", marker = "python_full_version < '3.14'", specifier = ">=3.0.1,<4.0.0" }, + { name = "sentence-transformers", specifier = ">=3.0.1,<4.0.0" }, { name = "spacy", marker = "python_full_version < '3.14'", specifier = ">=3.8.7,<4.0.0" }, { name = "thinc", specifier = ">=8.3.6,<9.0.0" }, { name = "tiktoken", specifier = ">=0.8.0,<1.0.0" },