DEV Community

Cover image for Install `docker-compose` on NVIDIA Jetson Nano
ductapedev
ductapedev

Posted on

Install `docker-compose` on NVIDIA Jetson Nano

When working with Jetpack 4.5.1 for NVIDIA Jetson Nano, it comes with Docker installed, but not docker-compose. And because the Nano is arm64 CPU architecture, installing Docker Compose is not straight forward. There are a number of existing tutorials listed in the references section, but none of them worked exactly as-is for me, or some of them have slightly bloated or less secure instructions that I would prefer. So here is my lean, mean, securely-installing machine instructions.

Install prerequisites

Make sure your Ubuntu installation is up to date with the usual apt-get commands

sudo apt-get update && sudo apt-get upgrade -y
Enter fullscreen mode Exit fullscreen mode

Install necessary Ubuntu packages

sudo apt-get install -y python3-pip libssl-dev python-openssl libffi-dev rustc cargo 
Enter fullscreen mode Exit fullscreen mode

Now the default version of pip and setuptools that ships with Jetpack 4.5.1 is not new enough to successfully install docker-compose. Those need to be upgraded before continuing. You can upgrade to the newest version, but here are the versions that I tested.

python3 -m pip install --upgrade pip==21.1.3 setuptools==56.2.0
Enter fullscreen mode Exit fullscreen mode

Then, once those are upgraded you can install Docker Compose. Docker Compose needs to be installed as root to give it access to the low-level system resources it needs to execute the installer.

sudo -H python3 -m pip install docker-compose==1.29.2
Enter fullscreen mode Exit fullscreen mode

And after that completes, you should be able to get the version with docker-compose --version

Docker without sudo

One thing that can be really annoying when using the default Jetpack version of docker is that you have to run everything with sudo. Here are the steps to add your user as part of the docker group.

sudo groupadd docker
sudo usermod -aG docker $USER
Enter fullscreen mode Exit fullscreen mode

Then log out and log back in as your user to make sure all the settings are applied properly. No more sudo!

References

https://developer.nvidia.com/jetpack-sdk-451-archive

https://docs.docker.com/engine/install/linux-postinstall/

https://dev.to/docker/install-docker-compose-1-28-2-on-nvidia-jetson-nano-is-not-straightforward-3952

https://collabnix.com/running-docker-compose-on-nvidia-jetson-nano-in-5-minutes/

Top comments (0)