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
Make sure your Ubuntu installation is up to date with the usual apt-get commands
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y python3-pip libssl-dev python-openssl libffi-dev rustc cargo
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
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
And after that completes, you should be able to get the version with
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
Then log out and log back in as your user to make sure all the settings are applied properly. No more sudo!