How to setup voxl-docker and voxl-cross
Install Docker, the voxl-docker script, and the voxl-cross image used to build VOXL applications.
Background
VOXL 2 is an embedded AI autopilot that runs a Linux operating system on top of a QRB5165 chipset. To develop applications for VOXL 2, you need to cross-compile from your PC and deploy those applications to VOXL 2.
VOXL Docker is a bash script that helps launch docker images with the right permissions and with the local directory mounted in the docker to easily build VOXL applications.
voxl-cross is a ubuntu-based docker image containing arm cross-compilers for VOXL. It includes the package manager which allows voxl packages to be installed in the docker image for easy dependency satisfaction when compiling. It is not the only, but is the most commonly, used docker image for compiling VOXL applications.
Installing VOXL Docker
Prerequisite: Install Docker CE
1) Install Docker Engine with Docker’s convenience script. The official Ubuntu instructions cover other install methods.
me@mylaptop:~/$ curl -fsSL https://get.docker.com -o get-docker.sh
me@mylaptop:~/$ sudo sh ./get-docker.sh
2) Add current user to docker group to allow usage of docker commands without root privileges. You will need to restart your OS after running this command for the group permissions to be applied.
me@mylaptop:~/$ sudo usermod -a -G docker $USER
me@mylaptop:~/$ sudo reboot
Install the voxl-docker Script
To build any VOXL project using VOXL Docker, you will need the dockerfiles and scripts in the voxl-docker repository. Install as below:
me@mylaptop:~/$ mkdir -p ~/git
me@mylaptop:~/$ cd ~/git
me@mylaptop:~/$ git clone https://gitlab.com/voxl-public/support/voxl-docker
me@mylaptop:~/$ cd voxl-docker
me@mylaptop:~/$ ./install-voxl-docker-script.sh
Testing your Installation
To test your installation, print the voxl-docker help, which lists its arguments:
me@mylaptop:~/$ voxl-docker -h
To list installed docker images (the list is empty until you install voxl-cross below):
me@mylaptop:~/$ voxl-docker -l
Installing voxl-cross
Install Pre-built voxl-cross
First, download the latest pre-built voxl-cross from the Docker Images folder on downloads.modalai.com, for example voxl-cross_V4.9.tgz. Build scripts require voxl-cross 4.4 or newer.
Then load the image, tag it as latest, and run it with voxl-docker, replacing 4.9 with the version you downloaded:
me@mylaptop:~/$ docker load -i voxl-cross_V4.9.tgz
me@mylaptop:~/$ docker tag voxl-cross:V4.9 voxl-cross:latest
me@mylaptop:~/$ voxl-docker -i voxl-cross
Build voxl-cross
If you would like to build the voxl-cross docker image yourself instead of using the pre-built version, you can find instructions for this at the project’s README.