Repository navigation
Expand file tree
/
Copy pathdevcontainer.json
More file actions
102 lines (92 loc) · 3.42 KB
/
Copy pathdevcontainer.json
File metadata and controls
102 lines (92 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
// --------------------------------------------------------
// [name] - Name of the development container
// --------------------------------------------------------
"name": "rag-api",
// --------------------------------------------------------
// [build] - Configure the build process
// --------------------------------------------------------
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"PYTHON_VERSION": "3.10"
}
},
// --------------------------------------------------------
// [features] - Install additional tools and runtimes
// --------------------------------------------------------
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest",
"moby": "false",
"dockerDashComposeVersion": "v2",
"installDockerBuildx": "true",
"installDockerComposeSwitch": "true"
}
// "ghcr.io/devcontainers/features/nvidia-cuda:1": {
// "installCudnn": "true"
// }
},
// --------------------------------------------------------
// [customizations] - Configure the development container
// --------------------------------------------------------
"customizations": {
"vscode": {
"extensions": [
"bierner.markdown-mermaid",
"dotenv.dotenv-vscode",
"EditorConfig.EditorConfig",
"gabdug.pdm",
"mechatroner.rainbow-csv",
"ms-azuretools.vscode-docker",
"ms-python.debugpy",
"ms-python.python",
"njpwerner.autodocstring",
"shardulm94.trailing-spaces",
"tamasfe.even-better-toml"
],
"settings": {
"python.linting.enabled": true,
"python.linting.pylintEnabled": true
}
}
},
// --------------------------------------------------------
// [forwardPorts] - Expose container ports to local machine
// --------------------------------------------------------
"forwardPorts": [8000],
// --------------------------------------------------------
// [portsAttributes] - Configure port forwarding behavior
// --------------------------------------------------------
"portsAttributes": {
"8000": {
"label": "Backend",
"onAutoForward": "notify"
}
},
// --------------------------------------------------------
// [remoteEnv] - Set environment variables for the container
// --------------------------------------------------------
"containerEnv": {},
// --------------------------------------------------------------
// [postCreateCommand] - Run setup tasks after container creation
// --------------------------------------------------------------
"postCreateCommand": "apt-get moo",
// --------------------------------------------------------
// [runArgs] - Additional arguments for docker run command
// --------------------------------------------------------
"runArgs": [
"--name=devcontainer-rag-api",
"--privileged",
"--network=host"
// "--gpus=all"
],
// --------------------------------------------------------
// [mounts] - Mount host Docker socket for docker-outside-of-docker
// --------------------------------------------------------
"mounts": [
// Add volume mount for NVIDIA runtime (if using nvidia-docker approach)
// "source=/dev/video0,target=/dev/video0,type=bind"
]
}