Skip to content

Commit 8e67813

Browse files
JBVAkshayamergify[bot]
authored andcommitted
Fix NVIDIA environment variables (#400)
(cherry picked from commit 812fea6)
1 parent 03dfe07 commit 8e67813

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.devcontainer/nvidia/devcontainer.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"--privileged",
1515
"--volume=/tmp/.X11-unix:/tmp/.X11-unix",
1616
"--volume=/mnt/wslg:/mnt/wslg",
17+
"--runtime=nvidia",
1718
"--gpus=all"
1819
],
1920
"containerEnv": {
@@ -22,14 +23,23 @@
2223
"XDG_RUNTIME_DIR": "${localEnv:XDG_RUNTIME_DIR}",
2324
"PULSE_SERVER": "${localEnv:PULSE_SERVER}",
2425
"LIBGL_ALWAYS_SOFTWARE": "1",
25-
"QT_X11_NO_MITSHM": "1"
26+
"QT_X11_NO_MITSHM": "1",
27+
"NVIDIA_VISIBLE_DEVICES": "all",
28+
"NVIDIA_DRIVER_CAPABILITIES": "all",
29+
"__GLX_VENDOR_LIBRARY_NAME": "nvidia",
30+
"__NV_PRIME_RENDER_OFFLOAD": "1",
31+
"__VK_LAYER_NV_optimus": "NVIDIA_only"
2632
},
2733
"customizations": {
2834
"vscode": {
2935
"settings": {
3036
"python.defaultInterpreterPath": "/home/ubuntu/.venv/blue/bin/python",
31-
"python.autoComplete.extraPaths": ["${workspaceFolder}/install/"],
32-
"python.analysis.extraPaths": ["${workspaceFolder}/install/"]
37+
"python.autoComplete.extraPaths": [
38+
"${workspaceFolder}/install/"
39+
],
40+
"python.analysis.extraPaths": [
41+
"${workspaceFolder}/install/"
42+
]
3343
},
3444
"extensions": [
3545
"ms-azuretools.vscode-docker",

0 commit comments

Comments
 (0)