Edge Device Setup¶
To meet the minimum requirements, your edge device needs to have a Linux-based OS installed, so as to be compatible with Docker. We’ve tested the following operating systems with the edgeIQ Docker image:
Your device also needs to have SSH access set up (SSH is required for the alwaysAI CLI to communicate with the device), and must be USB-camera or ribbon-camera capable (for apps that will be using a real-time video feed from a connected camera).
We’ve greatly simplified the Raspberry Pi setup process so that you can get started and move on to testing out some of our starter applications. To get your Raspberry Pi set up quickly and completely, download the alwaysAI Raspbian Buster OS image:
Next, flash the image onto a micro SD card using a tool such as balena Etcher. Finally, insert the SD card into the Pi and boot it up. Your Raspberry Pi is now ready to go, and includes balena WiFi Connect, which creates an access point (in the list of wifi networks that show up on your computer) that allows you to connect to your device.
To connect to your Raspberry Pi after setup with WiFi Connect, select the access point titled “alwaysAI Connect — <your device hostname>” (this will show up shortly after you start up the Pi) on your development machine. The default hostname is “alwaysai”. A box will pop up asking you to supply a network and password. See example below:
Choose the same WiFi network that you are connected to on your development machine, and enter the password for this network. This will connect your Pi to the selected WiFi network. Check the connection to your Pi from your development machine using SSH and
alwaysai as the password:
$ ssh pi@alwaysai
Note: If you’re having trouble locating your device on the network, mDNS can be used on Mac and Linux systems, enabling you to use
alwaysai.local as the hostname. Installation on Windows is possible but tricky. Another option is to find and use the IP address of the device in place of the hostname.
Now you can follow the instructions to download and run the starter applications from your terminal in the next section: Run a Starter Application.
(If you would prefer to set up your Raspberry Pi manually, check out our Raspberry Pi manual setup guide.)
Jetson Nano Developer Kit¶
To set up your Jetson Nano, first download the Jetpack 4.3 OS image (which has the drivers alwaysAI is expecting):
Next, flash the image onto a micro SD card using a tool such as balena Etcher. Once the image is done flashing, pop it into the micro SD slot found on the back underside of the removable Nano module. Your Jetson Nano is now ready to go. Note that, because the Jetson Nano Developer Kit doesn’t include a WiFi module, you can either connect your Jetson Nano directly to your laptop using an ethernet cable and then set up a static IP and share your network, or you can add a USB WiFi adapter and connect the Nano to the same WiFi network that your laptop is using.
(For a in-depth guide on setting up your Jetson Nano, follow along with our Jetson Nano setup guide.)
Other Single Board Computers¶
For other single board computers that require you to flash an OS image on the board, we recommend choosing a Debian-based image such as Debian Buster. On Debian installs, SSH and camera support are usually enabled out of the box, so the remaining task is to install Docker. Just follow these steps to install Docker:
From your development machine, SSH into your device using the device credentials:
$ ssh <username>@<hostname>
Download the latest Docker packages from the Docker download page. Select your architecture from the list, then download containerd.io, docker-ce-cli, and docker-ce. Install each package in the following order:
$ sudo apt-get install ./containerd.io_<version> $ sudo apt-get install ./docker-ce-cli_<version> $ sudo apt-get install ./docker-ce_<version>
(If Docker fails to start during the install, follow the steps outlined in the workaround for Docker start failure section.)
Give your user access to Docker and reboot your device:
$ sudo usermod -aG docker $USER $ sudo reboot
Once the device reboots, open a new SSH connection and test the Docker installation with the following command:
$ docker run hello-world
Your Debian Buster device is now ready to go!
Workaround for Docker Start Failure¶
If you get an error when installing
docker-ce, it may be caused by an update to how Buster manages IP tables. Run
dockerd in the foreground to get the full error message:
$ sudo dockerd
If your error message looks like this:
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING (exit status 4)
You can work around the issue with the following steps:
$ sudo update-alternatives --set iptables /usr/sbin/iptables-legacy $ sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy $ sudo service docker start