Build docker - rnanosaur/nanosaur GitHub Wiki
Nanosaur is based on jetson-containers with the Latest NVIDIA Jetpack, based ROS2 foxy.
There are two ways to build a nanosaur image, directly from your NVIDIA Jetson or on an x86 machine.
Build on NVIDIA Jetson
Remember to work directly on your NVIDIA Jetson and not cross-compile the docker images.
Build core
Clone nanosaur repository git clone https://github.com/rnanosaur/nanosaur.git
and build the image
cd $HOME/nanosaur_core/src/nanosaur
docker build -f Dockerfile -t nanosaur/nanosaur:latest .
Build nanosaur core image need time!
Build perception
Make a file jetson_multimedia_api.csv
and write:
dir, /usr/src/jetson_multimedia_api
Copy jetson_multimedia_api.csv
in /etc/nvidia-container-runtime/host-files-for-container.d
and restart the service
sudo cp jetson_multimedia_api.csv /etc/nvidia-container-runtime/host-files-for-container.d/jetson_multimedia_api.csv
sudo systemctl restart docker.service
Now you are able to build
cd $HOME/nanosaur_perception/src/nanosaur_perception
docker build -f Dockerfile -t -f Dockerfile nanosaur/perception:latest .
If you want to build a specific docker for other sensors change the file option like the example below
docker build -f Dockerfile -t -f Dockerfile.zed nanosaur/perception:latest .
Build nanosaur perception image need time!
Build on x86 platform
The following steps are mandatory to build the Nanosaur container on your x86 desktop. If you are working on your Jetson Nano, you can skip these steps.
These commands install QEMU and set the privilege on the container
sudo apt-get install qemu binfmt-support qemu-user-static -y
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
After that, you can rerun the same commands you have seen for an NVIDIA Jetson, such as:
cd $HOME/nanosaur_ws/src/nanosaur
docker build -f Dockerfile -t nanosaur/nanosaur:latest .