Skip to content

💾 Create minimalist, Ubuntu based images for the Nvidia jetson boards

Notifications You must be signed in to change notification settings

pythops/jetson-image

Repository files navigation

Nvidia Jetson Minimalist Images

Discord

Motivation

The need for the minimalist images came from the official jetson images being large in size and containing pre-installed packages that are not necessary, resulting in the consumption of valuable disk space and memory.

Supported boards

  • Jetson nano
  • Jetson nano 2gb
  • Jetson orin nano
  • Jetson agx orin
  • Jetso agx xavier
  • Jetson xavier nx

Spec

Supported Ubuntu releases: 20.04, 22.04, 24.04

L4T versions: 32.x, 35.x, 36.x

Important

For jetson orin nano, you might need to update the firmware before being able to use an image based on l4t 36.x

check this link for more information.

Build the jetson image

Note

Building the jetson image has been tested only on Linux machines.

Building the jetson image is fairly easy. All you need to have is the following tools installed on your machine.

Start by cloning the repo from github

git clone https://github.com/pythops/jetson-image
cd jetson-image

Then create a new rootfs with the desired ubuntu version.

Note

Only the orin family boards can use ubuntu 24.04

For ubuntu 24.04

just build-jetson-rootfs 24.04

This will create the rootfs in the rootfs directory.

Tip

You can modify the Containerfile.rootfs.* files to add any tool or configuration that you will need in the final image.

Next, use the following command to build the Jetson image:

$ just build-jetson-image -b <board> -r <revision> -d <device> -l <l4t version>

Tip

If you wish to add some specific nvidia packages that are present in the common section from this link such as libcudnn8 for instance, then edit the filel4t_packages.txt in the root directory, add list each package name on separate line.

For example, to build an image for jetson-orin-nano board:

$ just build-jetson-image -b jetson-orin-nano -d SD -l 36

Run with -h for more information

just build-jetson-image -h

Note

Not every jetson board can be updated to the latest l4t version.

Check this link for more information.

The Jetson image will be built and saved in the current directory in a file named jetson.img

Flashing the image into your board

To flash the jetson image, just run the following command:

$ sudo just flash-jetson-image <jetson image file> <device>

Where device is the name of the sdcard/usb identified by your system. For instance, if your sdard is recognized as /dev/sda, then replace device by /dev/sda

Note

There are numerous tools out there to flash images to sd card that you can use. I stick with dd as it's simple and does the job.

Nvidia Libraries

Once you boot the board with the new image, then you can install Nvidia libraries using apt

$ sudo apt install -y libcudnn8 libcudnn8-dev ...

Result

For the jetson orin nano for instance with the new image, only 220MB of RAM is used, which leaves plenty of RAM for your projects !

License

AGPLv3