Building Jetson Nano Images with Docker and Github Actions
Check out the jetson-nano-image-maker repo to build custom Jetson Nano images with Github Actions.
Most hobby robots come with pre-imaged software - often on an SD card. Unfortunately, not all hobby robots make it easy to alter their software or build your own images from scratch. Flashing with a custom image lets you control the software packages on the robot, add your own robot logic, and create new images to suit your specific project requirements.
The Jetson Nano Developer Kit is a popular hobby embedded computer, included in the nanosaur and Yahboom robot kits.
Jetson Nano Developer Kit (c) Nvidia
The documentation on how to make your own images from scratch is cumbersome and manual. For my projects, I prefer having automated images - ideally ones I can make from Continuous Integration (CI). Since the Jetson Nano uses an ARM processor, this presents additional challenges for automation if your computer uses an Intel or AMD processor.
Docker has a cool feature called buildx, which can cross-compile arm64 images on Intel/Amd64 hosts. Pairing Docker buildx with GitHub Actions provides a great set of workflows for automating our image building.
Make your own
To make your own images, fork the jetson-nano-image-maker repo and adjust the Dockerfile to suit your needs. You can add more packages to the base install, tweak existing packages, or set various configuration files by editing the Dockerfile at the root of the repo.
Once you are happy with your changes, push them to your repo and GitHub Actions will take it from there. Once the actions run, you’ll be able to access the action artifacts which will contain a
Grab your favorite SD card imaging software (I prefer balenaEtcher), and flash the image.
Put the image in your Jetson Nano and boot up!
Depending on your configuration, you’ll probably want to connect a network cable, HDMI cable, and keyboard. You can even choose to configure your image with a Wifi network, so your robot is online when it boots!
Fork and change the jetson-nano-image-maker repo for whatever your robot project might need!
Rinse and repeat
Automating the building of your images helps reproduce consistent and codified images for your robots. They reduce manual setup and give you a re-usable base for building your robot software.
Join our Slack community to ask any questions you may have about this tutorial, or reach out to us directly with any feedback.
Write messages in the JSON or Protobuf format for easy visualization in Foxglove Studio.
How to convert your ROS 2 files into MCAP files.
Get blog posts sent directly to your inbox.