Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a devcontainer to Andino repository #264

Open
wants to merge 8 commits into
base: humble
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "Andino",
"privileged": true,
"build": {
"context": "../",
"dockerfile": "../docker/Dockerfile",
"args": {
"USERID": "${localEnv:USER_UID:1000}",
"USER": "${localEnv:USER:ekumendev}"
}
},

"customizations": {
"vscode": {
"extensions": [
"streetsidesoftware.code-spell-checker",
"ms-iot.vscodel-ros",
"ms-vscode.cpptools",
"ms-python.python",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
},
"mounts": [
"source=${localWorkspaceFolder},target=/home/${localEnv:USER}/ws/src,type=bind",
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind",
"source=${localEnv:HOME}/.ssh,target=/home/${localEnv:USER}/.ssh,type=bind"
],
"runArgs": [
"--hostname=${localEnv:HOSTNAME:ekumendev}",
"--name=ros2_humble_andino_container",
"--gpus=all",
"--env=DISPLAY=${localEnv:DISPLAY}",
"--env=XDG_RUNTIME_DIR=${localEnv:XDG_RUNTIME_DIR}",
"--runtime=nvidia",
"--env=QT_X11_NO_MITSHM=1",
"--env=NVIDIA_VISIBLE_DEVICES=all",
"--env=NVIDIA_VISIBLE_DEVICES=all",
"--env=NVIDIA_DRIVER_CAPABILITIES=compute,utility,video"
],
"workspaceFolder": "/home/${localEnv:USER}/ws",
"postCreateCommand": "/bin/bash -c 'rosdep install --from-paths src --ignore-src -i -y && colcon build && source install/setup.bash'",
"shutdownAction": "stopContainer"
}

// REMINDER
// Please run xhost +local:docker on your host machine.

// Add the following line to .bashrc:
// export USER_UID=$(id -u)
// export USER=$(whoami)
// export HOSTNAME=$(hostname)