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

Dev #1

Merged
merged 4 commits into from
Aug 4, 2024
Merged
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
53 changes: 53 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "Andino",
"privileged": true,
"build": {
"context": "../",
"dockerfile": "../docker/Dockerfile",
"args": {
"USERID": "${localEnv:USER_UID}",
"USER": "${localEnv:USER}"
}
},

"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:HOST_HOSTNAME}",
"--name=ros2_humble_andino_container",
"--gpus=all",
"--runtime=nvidia",
"--env=NVIDIA_VISIBLE_DEVICES=all",
"--env=DISPLAY=${localEnv:DISPLAY}",
"--env=XDG_RUNTIME_DIR=${localEnv:XDG_RUNTIME_DIR}",
"--env=QT_X11_NO_MITSHM=1"
],
"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 HOST_HOSTNAME=$(hostname)