-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevcontainer.json
134 lines (125 loc) · 4.27 KB
/
devcontainer.json
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "UPT",
// "dockerFile": "Dockerfile",
"build": {
"dockerfile": "Dockerfile",
// "args": {
// "VARIANT": "focal"
// }
},
"remoteUser": "ubuntu", // WARN Match the username from Dockerfile
// * Move local workspace folder to user home
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/${localWorkspaceFolderBasename},type=bind", // WARN Match the username from Dockerfile
"workspaceFolder": "/home/ubuntu/${localWorkspaceFolderBasename}", // WARN Match the username from Dockerfile
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "os-provided" // * Use the version of Python provided by the OS
},
// "ghcr.io/devcontainers/features/anaconda:1": { },
// "ghcr.io/devcontainers/features/nvidia-cuda:1": {
// "installCudnn": false,
// "installCudnnDev": false,
// "installToolkit": true,
// "cudaVersion": "11.8", // * CUDA version
// "cudnnVersion": "8.6.0.163" // * cuDNN version
// },
// "ghcr.io/raucha/devcontainer-features/pytorch:latest": { }
},
"hostRequirements": {
"gpu": "optional"
},
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/usr/local/cuda/bin",
"LD_LIBRARY_PATH": "${containerEnv:LD_LIBRARY_PATH}:/usr/local/cuda/lib64"
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/bin/bash -c 'uname -a && source ~/.bashrc && pre-commit install --install-hooks' && /bin/bash",
// Configure tool-specific properties.
"customizations": {
"bash-history": {
"enabled": true
},
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
},
"extensions": [
"jeff-hykin.better-cpp-syntax",
"aaron-bond.better-comments",
"alefragnani.Bookmarks",
"ms-vscode.cpptools-themes",
"usernamehw.errorlens",
"GitHub.remotehub",
"ms-toolsai.jupyter-keymap",
"PKief.material-icon-theme",
"IBM.output-colorizer",
"johnpapa.vscode-peacock",
"alefragnani.project-manager",
"KevinRose.vsc-python-indent",
"ms-dotnettools.vscode-dotnet-runtime",
"almenon.arepl",
"njpwerner.autodocstring",
"ms-python.black-formatter",
"ms-vscode.cpptools",
"jbenden.c-cpp-flylint",
"ms-vscode.cpptools-extension-pack",
"matepek.vscode-catch2-test-adapter",
"xaver.clang-format",
"twxs.cmake",
"josetr.cmake-language-support-vscode",
"ms-vscode.cmake-tools",
"streetsidesoftware.code-spell-checker",
"adpyke.codesnap",
"moshfeu.compare-folders",
"PeterSchmalfeldt.explorer-exclude",
"doi.fileheadercomment",
"mhutchie.git-graph",
"github.vscode-github-actions",
"GitHub.copilot",
"GitHub.copilot-chat",
"GitHub.vscode-pull-request-github",
"eamodio.gitlens",
"oderwat.indent-rainbow",
"VisualStudioExptTeam.vscodeintellicode",
"VisualStudioExptTeam.intellicode-api-usage-examples",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ymotongpoo.licenser",
"yzhang.markdown-all-in-one",
"ms-python.vscode-pylance",
"ms-python.python",
"ms-python.debugpy",
"donjayamanne.python-environment-manager",
"njqdev.vscode-python-typehint",
"charliermarsh.ruff",
"Gruntfuggly.todo-tree",
"smilerobotics.urdf",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"leodevbro.blockman"
]
}
},
// * GUI support
"mounts": [
"type=bind,source=${localEnv:HOME}/.ssh,target=/home/ubuntu/.ssh,readonly", // WARN Match the username from Dockerfile
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached"
],
"runArgs": [
"--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
"--net", "host",
"-e", "DISPLAY=:0",
"-e", "XAUTHORITY=/tmp/.Xauthority",
"-v", "${localEnv:HOME}/.Xauthority:/tmp/.Xauthority",
"--gpus", "all",
// "--shm-size", "16gb" // * Increase shared memory size
]
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
}