I am setting up a nvidia jetson nano to run docker containers. I am using an installation procedure that I already used on my x86_64 Ubuntu 16.04 machine, where docker runs smoothely. Nonetheless, docker seems to be set up correctly, but I can't run it.
I flashed the jetson SD card as described in http://nvidia.com/jetsonnano-start, and set up language etc via keyboard and screen. After that I went headless and installed via ssh. The commands I used are shown in the listing below.
# in case apt-get is interrupted, e.g. if board freezes, use: $ sudo dpkg --configure -a
sudo apt-get update && apt-get -y upgrade
# install Docker, from https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt install -y \
git \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
# Get the Docker signing key for packages
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
# Add the Docker official repos
echo "deb [arch=arm64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list
# Install Docker
sudo apt update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# starting Docker and enabling it at boot
sudo systemctl enable docker
sudo systemctl start docker
# ad user to docker group, so docker commands can be executed without sudo
sudo gpasswd -a $USER docker
newgrp docker
# install docker-compose
sudo apt-get install -y python-pip python-dev libffi6 libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
sudo -H pip install docker-compose
and after installation, I can see
$ docker --version
Docker version 19.03.2, build 6a30dfc
however, when excuting something, I get exec format errors
$ docker run jupyter/minimal-notebook
standard_init_linux.go:211: exec user process caused "exec format error"
Docker does pull the image. And in Dockerfiles, the WORKDIR
command works, but RUN
commands yield the same 'exec format error'.
Any help or hint on how to the this to run without errors is greatly appreciated
The issue is that the architecture of the jetson nano is aarch64 (64 bit ARM). There is no Anaconda build for this, but a project called Archiconda exists that steps into the gap.
See: https://devtalk.nvidia.com/default/topic/1051415/jetson-nano/anaconda-for-jetson-nano/
for a jupyter notebook from Docker on a Jetson Nano, it helped me to follow this Dockerfile (as from the link above): https://github.com/helmuthva/jetson/blob/master/workflow/deploy/ml-base/src/Dockerfile