Skip to content

Commit ed682ae

Browse files
authored
fix: explicitly tell uv to copy when using devcontainer (#32267)
1 parent caf1919 commit ed682ae

File tree

1 file changed

+52
-49
lines changed

1 file changed

+52
-49
lines changed

.devcontainer/devcontainer.json

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,58 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
33
{
4-
// Name for the dev container
5-
"name": "langchain",
6-
// Point to a Docker Compose file
7-
"dockerComposeFile": "./docker-compose.yaml",
8-
// Required when using Docker Compose. The name of the service to connect to once running
9-
"service": "langchain",
10-
// The optional 'workspaceFolder' property is the path VS Code should open by default when
11-
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
12-
"workspaceFolder": "/workspaces/langchain",
4+
// Name for the dev container
5+
"name": "langchain",
6+
// Point to a Docker Compose file
7+
"dockerComposeFile": "./docker-compose.yaml",
8+
// Required when using Docker Compose. The name of the service to connect to once running
9+
"service": "langchain",
10+
// The optional 'workspaceFolder' property is the path VS Code should open by default when
11+
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
12+
"workspaceFolder": "/workspaces/langchain",
1313
"mounts": [
1414
"source=langchain-workspaces,target=/workspaces/langchain,type=volume"
1515
],
16-
// Prevent the container from shutting down
17-
"overrideCommand": true,
18-
// Features to add to the dev container. More info: https://containers.dev/features
19-
"features": {
20-
"ghcr.io/devcontainers/features/git:1": {},
21-
"ghcr.io/devcontainers/features/github-cli:1": {}
22-
},
23-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
24-
// "forwardPorts": [],
25-
// Run commands after the container is created
26-
"postCreateCommand": "uv sync && echo 'LangChain (Python) dev environment ready!'",
27-
// Configure tool-specific properties.
28-
"customizations": {
29-
"vscode": {
30-
"extensions": [
31-
"ms-python.python",
32-
"ms-python.debugpy",
33-
"ms-python.mypy-type-checker",
34-
"ms-python.isort",
35-
"unifiedjs.vscode-mdx",
36-
"davidanson.vscode-markdownlint",
37-
"ms-toolsai.jupyter",
38-
"GitHub.copilot",
39-
"GitHub.copilot-chat"
40-
],
41-
"settings": {
42-
"python.defaultInterpreterPath": ".venv/bin/python",
43-
"python.formatting.provider": "none",
44-
"[python]": {
45-
"editor.formatOnSave": true,
46-
"editor.codeActionsOnSave": {
47-
"source.organizeImports": true
48-
}
49-
}
50-
}
51-
}
52-
}
53-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
54-
// "remoteUser": "root"
55-
}
16+
// Prevent the container from shutting down
17+
"overrideCommand": true,
18+
// Features to add to the dev container. More info: https://containers.dev/features
19+
"features": {
20+
"ghcr.io/devcontainers/features/git:1": {},
21+
"ghcr.io/devcontainers/features/github-cli:1": {}
22+
},
23+
"containerEnv": {
24+
"UV_LINK_MODE": "copy"
25+
},
26+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
27+
// "forwardPorts": [],
28+
// Run commands after the container is created
29+
"postCreateCommand": "uv sync && echo 'LangChain (Python) dev environment ready!'",
30+
// Configure tool-specific properties.
31+
"customizations": {
32+
"vscode": {
33+
"extensions": [
34+
"ms-python.python",
35+
"ms-python.debugpy",
36+
"ms-python.mypy-type-checker",
37+
"ms-python.isort",
38+
"unifiedjs.vscode-mdx",
39+
"davidanson.vscode-markdownlint",
40+
"ms-toolsai.jupyter",
41+
"GitHub.copilot",
42+
"GitHub.copilot-chat"
43+
],
44+
"settings": {
45+
"python.defaultInterpreterPath": ".venv/bin/python",
46+
"python.formatting.provider": "none",
47+
"[python]": {
48+
"editor.formatOnSave": true,
49+
"editor.codeActionsOnSave": {
50+
"source.organizeImports": true
51+
}
52+
}
53+
}
54+
}
55+
}
56+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
57+
// "remoteUser": "root"
58+
}

0 commit comments

Comments
 (0)