Updated noble dev container with nvidia runtime example

This commit is contained in:
matlabbe
2026-04-26 15:40:26 -07:00
parent ebba7e4878
commit 2314c4dfa5
+14 -2
View File
@@ -4,7 +4,7 @@
}, },
"customizations": { "customizations": {
"vscode": { "vscode": {
"extensions": ["ms-vscode.cpptools-themes", "ms-vscode.cmake-tools"] "extensions": ["ms-vscode.cpptools-themes", "ms-vscode.cmake-tools", "ms-vscode.cpptools-extension-pack"]
} }
}, },
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/rtabmap,type=bind", "workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/rtabmap,type=bind",
@@ -14,5 +14,17 @@
"terminal.integrated.defaultProfile.linux": "bash" "terminal.integrated.defaultProfile.linux": "bash"
}, },
"remoteUser": "vscode", "remoteUser": "vscode",
"runArgs": ["--privileged", "--network=host"] "hostRequirements": {
"gpu": "optional"
},
"runArgs": ["--privileged",
"--network=host",
"--gpus=all",
//"--runtime=nvidia", // uncommment this if rtabmap doesn't show up in nvidia-smi on the host computer
"--env=DISPLAY",
"--env=QT_X11_NO_MITSHM=1",
"--volume=/tmp/.X11-unix:/tmp/.X11-unix"],
"containerEnv": {
"NVIDIA_VISIBLE_DEVICES": "all"
}
} }