This document provides a guide for setting up a ROS2 Docker container for Jetson. It includes instructions for using a pre-built Docker image from DockerHub, which varies depending on the Jetpack version. The guide also includes information on modifying the daemon.json file and restarting the Docker service before building the container and adding the current user to the docker group. Finally, the guide provides a link to the DockerHub page for the ROS2 container and the command for pulling and running the container.
This procedure will guide you to setup a ROS2 Docker container on Jetson.
<aside> š” Note:Ā the version of JetPack-L4T that you have installed on your Jetson needs to match the tag above. If you have a different version of JetPack-L4T installed, either upgrade to the latest JetPack orĀ Build the Project from SourceĀ to compile the project directly.
</aside>
Before pulling the pre-build docker image check the Jetpack version by running this command:
sudo apt show nvidia-jetpack -a
<aside> š” The output would be similar to this: (not necessarily the same, just for an idea)
</aside>
Package: nvidia-jetpack
Version: 4.6.3-b17
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 199 kB
Depends: nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0), nvidia-cuda (= 4.6.3-b17), nvidia-tensorrt (= 4.6.3-b17), nvidia-nsight-sys (= 4.6.3-b17), nvidia-cudnn8 (= 4.6.3-b17), nvidia-opencv (= 4.6.3-b17), nvidia-container (= 4.6.3-b17), nvidia-vpi (= 4.6.3-b17)
Homepage: <http://developer.nvidia.com/jetson>
Download-Size: 29.4 kB
APT-Sources: <https://repo.download.nvidia.com/jetson/t194> **r32.7**/main arm64 Packages
Description: NVIDIA Jetpack Meta Package
<aside> š” Note: L4T R32.7.0 containers can be run on JetPack 4.6 (L4T R32.7.0)
</aside>
You must then modify the fileĀ /etc/docker/daemon.json
Ā before building the container:
sudo gedit /etc/docker/daemon.json
Modify the file and save it:
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"default-runtime": "nvidia"
}
You must restart the Docker service before building the container to apply: