-
Notifications
You must be signed in to change notification settings - Fork 0
/
devcontainer.json
65 lines (65 loc) · 2 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
{
"name": "${localWorkspaceFolderBasename}",
"build": {
"context": "${localWorkspaceFolder}",
"dockerfile": "${localWorkspaceFolder}/Dockerfile",
"cacheFrom": "andrejorsula/drl_air_hockey"
},
"workspaceFolder": "/src/drl_air_hockey",
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/src/drl_air_hockey",
"runArgs": [
// Network mode
"--network=host",
"--ipc=host",
// NVIDIA GPU
"--gpus=all",
// Other GPUs
"--device=/dev/dri:/dev/dri",
"--group-add=video"
],
"mounts": [
// Local time
"type=bind,source=/etc/localtime,target=/etc/localtime,readonly",
// Input devices
"type=bind,source=/dev/input,target=/dev/input",
// GUI (X11)
"type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix",
"type=bind,source=${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename},target=${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename}"
],
"containerEnv": {
// GUI (X11)
"DISPLAY": "${localEnv:DISPLAY}",
"XAUTHORITY": "${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename}",
// NVIDIA GPU
"NVIDIA_VISIBLE_DEVICES": "all",
"NVIDIA_DRIVER_CAPABILITIES": "all"
},
"initializeCommand": "XAUTH=\"${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename}\"; touch \"${XAUTH}\"; chmod a+r \"${XAUTH}\"; XAUTH_LIST=$(xauth nlist \"${localEnv:DISPLAY}\"); if [ -n \"${XAUTH_LIST}\" ]; then echo \"${XAUTH_LIST}\" | sed -e 's/^..../ffff/' | xauth -f \"${XAUTH}\" nmerge -; fi",
"customizations": {
"vscode": {
"extensions": [
// Bash
"mads-hartmann.bash-ide-vscode",
// CMake
"ms-vscode.cmake-tools",
"twxs.cmake",
// Python
"ms-python.python",
"ms-python.black-formatter",
"ms-python.isort",
// Yaml
"redhat.vscode-yaml",
// XML
"redhat.vscode-xml",
// Utils
"christian-kohler.path-intellisense"
],
"settings": {
"python.languageServer": "Jedi",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
}
}
}