Did you know? In the latest Docker 19.03 Release, a new flag –gpus have been added for docker run which allows to specify GPU resources to be passed through to the Docker Image(NVIDIA GPUs). The latest nvidia-docker has already adopted this feature (see github), but deprecated --runtime=nvidia.

Last Dockercon, I met with a four-wheeled knee-high tiny cute food delivery robot called Kiwibot. Built by KiwiCampus Inc., Kiwibot is the robot counterpart of the pizza delivery person. Thanks to Dockercon for bringing this amazing piece of technology in-house for distributing swags, stickers, chocolates and goodies.

What’s so cool about Kiwibots?

Just open up your Wiki app and place an order for food. When you place an order online(facility to choose a participating restaurant), you get the option of delivery via Kiwi. Once you choose, one of the company’s fleet of super cool robots with insulated, locking storage compartments will swing by the place, your order is put within, and it brings it to your location. You can even watch the last bit live from the robot’s perspective as it rolls up to your place. Amazing, isn’t it?

Well, the super cute make and structure of these kiwibots looked interesting to me BUT what fascinated me really is the technology behind these small robots. A Kiwibot is equipped with six cameras and GPS to deliver the order at the right place. Nice ! Now here comes the best part. Only the person who has ordered will be able to open the Kiwibot and retrieve the order through the app which means it is intelligent enough to do object detection and analytics too. Interesting !!

Tell me more…


I went through the technology stack and was really amazed to learn that it uses NVIDIA Jetson TX2 system for  all of the AI processing, imaging, and related computing tasks(see picture below). Jetson TX2 is a credit card-sized platform that puts AI computing to work in the world all around us. Obviously, GPU-based deep learning has given computers the ability to understand — and react to — the data streaming in from all these devices in uncanny new ways. Both through training — which creates smart systems — and through inference — which creates systems that are able to react intelligently to the world around them in real time.

Before I loose my patience any further, the day finally arrived when I was lucky enough to hold the most powerful AI platform in my hand.

The NVIDIA® Jetson Nano™ Developer Kit is purely an AI computer. It is a small, powerful computer that lets you run multiple neural networks in parallel for applications like image classification, object detection, segmentation, and speech processing. All in an easy-to-use platform that runs in as little as 5 watts. It is perfect for makers, learners, and developers that brings the power of modern artificial intelligence to a low-power, easy-to-use platform.

Some Really Useful Facts around NVIDIA Jetson Nano..

  • There are 2 ways to power a Jetson Nano – either using Micro USB power supplies Or by using Barrel Jack 5V 4A(20W) power supplies. I don’t recommend using the normal micro-USB adapter which you use for mobile. Buy here if you are in India
  • Jetson Nano works in 2 model – MAXN and 5 Watt. By default the Nano works at MAXN(10 Watt mode). If using a Micro USB adapter you should change that immediately to 5W mode. When using the barrel jack to connect a 5V 4A (20W) power supply, you should set the Nano into 10 Watt mode to allow maximum power usage. Learn more
  • No WiFi module is shipped with this board. A user can easily get a wifi dongle or module that’s already been certified and plug it in for the usage
  • Jetson Nano is supported by the comprehensive NVIDIA® JetPack™ SDK, and has the performance and capabilities needed to run modern AI workloads. JetPack includes:
  • Jetson Nano comes with Full desktop Linux with NVIDIA driver, AI and Computer Vision libraries and APIs. developer tools & documentation and sample code.

Installing Docker 19.03 on NVIDIA Jetson Nano

Early this May 2019, I wrote a blog post around Docker 19.03 which comes with a new –gpus CLI plugin capability. With the recent 19.03 GA Release, now you don’t need to spend time in downloading the NVIDIA-DOCKER plugin and rely on nvidia-wrapper to launch GPU containers. All you can now use –gpus option with docker run CLI to allow containers to use GPU devices seamlessly.

As I wanted to try running CUDA containers on Jetson Nano, I couldn’t wait to update it to 19.03 release so as to see how containers can leverage the existing GPU device. Under this blog post, I will showcase how to get started with Docker 19.03 on Jetson Nano.

Preparing Jetson Nano

  • Unboxing Jetson Nano Pack
  • Preparing your microSD card

To prepare your microSD card, you’ll need a computer with Internet connection and the ability to read and write SD cards, either via a built-in SD card slot or adapter.

  1. Download the Jetson Nano Developer Kit SD Card Image, and note where it was saved on the computer.
  2. Write the image to your microSD card( atleast 16GB size) by following the instructions below according to the type of computer you are using: Windows, Mac, or Linux. If you are using Windows laptop, you can use SDFormatter software for formatting your microSD card and Win32DiskImager to flash Jetson Nano Image. In case you are using Mac, you will need Etcher software.
  1. To prepare your microSD card, you’ll need a computer with Internet connection and the ability to read and write SD cards, either via a built-in SD card slot or adapter

The Jetson Nano SD card image is of 12GB(uncompressed size).

Next, It’s time to remove this tiny SD card from SD card reader and plugin it to Jetson Board to let it boot.

Wow ! Jetson Nano comes with 18.09 by default

Yes, you read it correct. Let us try it once. First we will verify OS version running on Jetson Nano.

Verifying OS running on Jetson Nano

jetson@jetson-desktop:~$ sudo cat /etc/os-release
VERSION="18.04.2 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.2 LTS"

Verifying Docker

jetson@jetson-desktop:~$ sudo docker version
 Version:           18.09.2
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        6247962
 Built:             Tue Feb 26 23:51:35 2019
 OS/Arch:           linux/arm64
 Experimental:      false

  Version:          18.09.2
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       6247962
  Built:            Wed Feb 13 00:24:14 2019
  OS/Arch:          linux/arm64
  Experimental:     false

Updating OS Repository

sudo apt update

Installing Docker 19.03 Binaries

You will need curl command to update Docker 18.09 to 19.03 flawlessly.

sudo apt install curl
curl -sSL https://get.docker.com/ | sh
jetson@jetson-desktop:~$ sudo docker version
Client: Docker Engine - Community
 Version:           19.03.2
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        6a30dfc
 Built:             Thu Aug 29 05:32:21 2019
 OS/Arch:           linux/arm64
 Experimental:      false

Server: Docker Engine - Community
  Version:          19.03.2
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       6a30dfc
  Built:            Thu Aug 29 05:30:53 2019
  OS/Arch:          linux/arm64
  Experimental:     false
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
  Version:          0.18.0
  GitCommit:        fec3683

Installing Docker Compose

root@jetson-desktop:/home/jetson# /usr/bin/docker-compose version
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.15+
OpenSSL version: OpenSSL 1.1.1  11 Sep 2018

Turn Your Jetson Nano into CCTV Camera

You can connect USB camera module directly into Jetson Nano camera slot and it should work flawlessly.

All you need to do is clone the below GITHUB repository and run the script.

git clone https://github.com/ajeetraina/docker-cctv-raspbian
cd docker-cctv-raspbian
sh run.sh

The script will pull the Docker Image from DockerHub and run the container to turn your Jetson Nano into CCTV camera.

root@jetson-desktop:~/docker-cctv-raspbian# docker ps
CONTAINER ID        IMAGE                             COMMAND             CREATED             STATUS              PORTS                    NAMES
b6ff860d4f2a        ajeetraina/docker-cctv-raspbian   "motion"            6 seconds ago       Up 2 seconds>8081/tcp   hopeful_newton

Just one liner CLI and I was able to see my logitech webcam in action.(see below)

Figure: This image is captured by Logitech webcam mounted on Jetson Nano board

Running Hello World Example with Jetson Nano

jetson@jetson-desktop:~$ docker run arm64v8/hello-world
Unable to find image 'arm64v8/hello-world:latest' locally
latest: Pulling from arm64v8/hello-world
3b4173355427: Pull complete
Digest: sha256:5970f71561c8ff01d1d97782f37b0142315c53f31ad23c22883488e36a6dcbcb
Status: Downloaded newer image for arm64v8/hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:

For more examples and ideas, visit:


Verifying NVIDIA Container Runtime

NVIDIA Container Runtime with Docker integration (via the nvidia-docker2 packages) is included as part of NVIDIA JetPack. It is available for install via the NVIDIA SDK Manager along with other JetPack components as shown below:

jetson@jetson-desktop:~$ sudo docker info | grep nvidia
 Runtimes: nvidia runc
jetson@jetson-desktop:~$ sudo dpkg --get-selections | grep nvidia
libnvidia-container-tools                       install
libnvidia-container0:arm64                      install
nvidia-container-runtime                        install
nvidia-container-runtime-hook                   install
nvidia-docker2                                  deinstall
nvidia-l4t-3d-core                              install
nvidia-l4t-apt-source                           install
nvidia-l4t-bootloader                           install
nvidia-l4t-camera                               install
nvidia-l4t-ccp-t210ref                          install
nvidia-l4t-configs                              install
nvidia-l4t-core                                 install
nvidia-l4t-cuda                                 install
nvidia-l4t-firmware                             install
nvidia-l4t-graphics-demos                       install
nvidia-l4t-gstreamer                            install
nvidia-l4t-init                                 install
nvidia-l4t-kernel                               install
nvidia-l4t-kernel-dtbs                          install
nvidia-l4t-kernel-headers                       install
nvidia-l4t-multimedia                           install
nvidia-l4t-multimedia-utils                     install
nvidia-l4t-oem-config                           install
nvidia-l4t-tools                                install
nvidia-l4t-wayland                              install
nvidia-l4t-weston                               install
nvidia-l4t-x11                                  install
nvidia-l4t-xusb-firmware                        install

Running CUDA on Containers on Jetson Nano

jetson@jetson-desktop:~$ sudo docker run -it --runtime nvidia devicequery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "NVIDIA Tegra X1"
  CUDA Driver Version / Runtime Version          10.0 / 10.0
  CUDA Capability Major/Minor version number:    5.3
  Total amount of global memory:                 3956 MBytes 
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes

What’s Next?

Integrating Pico – A Deep Learning Platform with Jetson & Docker is an exciting project I am working on. If you’re completely new, do check out
https://github.com/collabnix/pico for further details.


Categories: Docker

Ajeet Raina

My name is Ajeet Singh Raina and I am an author of this blogging site. I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I bagged 2 special awards last year(2019) : Firstly, “The Tip of Captain’s Hat Award” at Dockercon 2019, San Francisco and secondly, “2019 Docker Community Award“. I run Collabnix Community Slack with over 4700+ audience as well as Redis Community Slack with close to 500+ members. I have built popular GITHUB repositories like DockerLabs, KubeLabs, Kubetools, RedisPlanet Terraform etc. with the support of Collabnix Community. Currently working as Developer Relations Manager at Redis Labs where I help customers and community members adopt Redis. With over 11,000+ followers over LinkedIn & close to 4800+ twitter followers, I like sharing Docker and Kubernetes related content . You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)


Eduardo · 14th June 2020 at 10:39 am

Hi, thanks for the article. I do, however, have some observations.

1) I’m running on jetpack 4.3 (stock), and I had to install docker first (the nvidia runtime was there, though, but not the main docker packages).

2) The article is titled xxx on the jetson nano, and it points to a docker image for the raspberry pi. I guess it may have some things in common (maybe 100% compatible), but it’s a little bit confusing, especially when you’re kinda struggling through the steps. Furthermore, if you go to the project page (https://github.com/ajeetraina/docker-cctv-raspbian) it does not have a single reference to jetson or nano, only pi, and maybe it’s ok, but still remember I got here looking for jetson info. A little bit confusing at least.

3) The following steps contradict the instructions in the README:
git clone https://github.com/ajeetraina/docker-cctv-raspbian
cd docker-cctv-raspbian
sh run.sh

The project’s README tell you to build the image before running it. Maybe it works for you because you had it al ready built, but if running it for the first time, it will fai, unless you follow the extra instructions in the README for building the image first.

4) A similar thing happens with the following instructions:
sudo docker run -it –runtime nvidia devicequery

It just won;t work unless you have the image (which didn’t exist) or build it.
Instructions for building it are present here: https://github.com/Technica-Corporation/Tegra-Docker#simple-gpu-docker-image

Which tells you to build the image, and even make the deviceQuery executable that wasn’t also even there.

After all that, and after passing many more arguments when running the devicequery docker image, I was finally able to make it run. All instructions are available in the link I mentioned.

Despite all this, and after some struggle, at least the article pointed me in the right direction. I hope these extra steps help whoever may come here after me.


2019 Year in Review: The Rise of Pico, Collabnix Slack & DockerLabs – Collabnix · 27th December 2019 at 2:14 pm

[…] Docker 19.03 comes to NVIDIA Jetson Nano  […]

Object Detection with Yolo Made Simple using Docker on NVIDIA Jetson Nano – Collabnix · 11th January 2020 at 11:06 am

[…] Pico goes Cloudless: Running RTMP & Nginx for Video Streaming using Docker on Jetson Nano locally Multi-Node K3s Cluster on NVIDIA Jetson Nano in 5 Minutes Docker 19.03 comes to NVIDIA Jetson Nano […]

Leave a Reply

Your e-mail address will not be published. Required fields are marked *