fix: explicitly tell uv to copy when using devcontainer (#32267)

This commit is contained in:
Mason Daugherty 2025-07-28 00:01:06 -04:00 committed by GitHub
parent caf1919217
commit ed682ae62d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,55 +1,58 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose // README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{ {
// Name for the dev container // Name for the dev container
"name": "langchain", "name": "langchain",
// Point to a Docker Compose file // Point to a Docker Compose file
"dockerComposeFile": "./docker-compose.yaml", "dockerComposeFile": "./docker-compose.yaml",
// Required when using Docker Compose. The name of the service to connect to once running // Required when using Docker Compose. The name of the service to connect to once running
"service": "langchain", "service": "langchain",
// The optional 'workspaceFolder' property is the path VS Code should open by default when // The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml // connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/workspaces/langchain", "workspaceFolder": "/workspaces/langchain",
"mounts": [ "mounts": [
"source=langchain-workspaces,target=/workspaces/langchain,type=volume" "source=langchain-workspaces,target=/workspaces/langchain,type=volume"
], ],
// Prevent the container from shutting down // Prevent the container from shutting down
"overrideCommand": true, "overrideCommand": true,
// Features to add to the dev container. More info: https://containers.dev/features // Features to add to the dev container. More info: https://containers.dev/features
"features": { "features": {
"ghcr.io/devcontainers/features/git:1": {}, "ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {} "ghcr.io/devcontainers/features/github-cli:1": {}
}, },
// Use 'forwardPorts' to make a list of ports inside the container available locally. "containerEnv": {
// "forwardPorts": [], "UV_LINK_MODE": "copy"
// Run commands after the container is created },
"postCreateCommand": "uv sync && echo 'LangChain (Python) dev environment ready!'", // Use 'forwardPorts' to make a list of ports inside the container available locally.
// Configure tool-specific properties. // "forwardPorts": [],
"customizations": { // Run commands after the container is created
"vscode": { "postCreateCommand": "uv sync && echo 'LangChain (Python) dev environment ready!'",
"extensions": [ // Configure tool-specific properties.
"ms-python.python", "customizations": {
"ms-python.debugpy", "vscode": {
"ms-python.mypy-type-checker", "extensions": [
"ms-python.isort", "ms-python.python",
"unifiedjs.vscode-mdx", "ms-python.debugpy",
"davidanson.vscode-markdownlint", "ms-python.mypy-type-checker",
"ms-toolsai.jupyter", "ms-python.isort",
"GitHub.copilot", "unifiedjs.vscode-mdx",
"GitHub.copilot-chat" "davidanson.vscode-markdownlint",
], "ms-toolsai.jupyter",
"settings": { "GitHub.copilot",
"python.defaultInterpreterPath": ".venv/bin/python", "GitHub.copilot-chat"
"python.formatting.provider": "none", ],
"[python]": { "settings": {
"editor.formatOnSave": true, "python.defaultInterpreterPath": ".venv/bin/python",
"editor.codeActionsOnSave": { "python.formatting.provider": "none",
"source.organizeImports": true "[python]": {
} "editor.formatOnSave": true,
} "editor.codeActionsOnSave": {
} "source.organizeImports": true
} }
} }
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. }
// "remoteUser": "root" }
} }
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}