How to install Docker on Jetson Orin NX?

I just got my Jetson Orin NX and wanted to use jetson-containers. So I ran the docker command, but it seems that docker is not installed. When I search the documentation and the forum, I cannot find any instructions in how to install docker on Jetson Orin NX. It looks like it should have been pre-installed. Can anyone tell me how to install Docker on the Jetson Orin NX?

kind regards,
Ed

*** Please note that this reply is generated by LLM automatically ***

Installing Docker on Jetson Orin NX (J4012) is a relatively straightforward process. Although it’s not explicitly mentioned in the provided documentation, we can infer the steps from the information available.

Prerequisites:

  1. Ensure you have a Jetson Orin NX (J4012) module with the latest Jetson Linux image flashed.
  2. Familiarize yourself with the terminal and basic Linux commands.

Installing Docker:

Since Docker is not pre-installed on the Jetson Orin NX, you’ll need to install it manually. You can follow these steps:

  1. Update the package list: Run the command sudo apt update to update the package list.
  2. Install Docker: Run the command sudo apt install docker.io to install Docker.
  3. Start the Docker service: Run the command sudo systemctl start docker to start the Docker service.
  4. Enable Docker to start automatically: Run the command sudo systemctl enable docker to enable Docker to start automatically on boot.

Configuring Docker:

After installing Docker, you’ll need to configure it to use the NVIDIA runtime. This is necessary for running GPU-accelerated containers on your Jetson Orin NX.

  1. Create a new file: Run the command sudo nano /etc/docker/daemon.json to create a new file.
  2. Add the NVIDIA runtime configuration: Add the following configuration to the file:
{
    "runtimes": {
        "nvidia": {
            "args": [],
            "path": "nvidia-container-runtime"
        }
    },
    "default-runtime": "nvidia"
}
  1. Save and exit: Save the file and exit the editor.
  2. Restart the Docker service: Run the command sudo systemctl restart docker to restart the Docker service.

Verifying Docker Installation:

To verify that Docker is installed and running correctly, you can run the command docker --version. This should display the version of Docker installed on your system.

Running Docker Commands without Sudo:

To run Docker commands without using sudo, you’ll need to add your user to the Docker group.

  1. Create the Docker group: Run the command sudo groupadd docker to create the Docker group.
  2. Add your user to the Docker group: Run the command sudo usermod -aG docker $USER to add your user to the Docker group.
  3. Reboot your system: Reboot your system to apply the changes.

After rebooting, you should be able to run Docker commands without using sudo.

Comparison with Other Jetson Modules:

The installation process for Docker on Jetson Orin NX is similar to other Jetson modules, such as Jetson AGX Orin and Jetson Xavier NX. However, the specific steps may vary depending on the module and the version of Jetson Linux installed.

In summary, installing Docker on Jetson Orin NX (J4012) involves installing the Docker package, configuring the NVIDIA runtime, and adding your user to the Docker group. By following these steps, you should be able to get Docker up and running on your Jetson Orin NX module.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***