Working with Edge Devices

Edge devices are small, lightweight, devices on which a computer vision application can be deployed and run. Many edge devices today even have a Graphical Processing Unit (GPU), or Visual Processing Unit (VPU), which enable usage of a greater range of models and application complexity. This has many benefits, including reduced cost, reduced latency, and improved security. When you use alwaysAI to develop computer vision applications, you can easily run any your applications on a variety of different edge devices with minor changes to configuration.

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:

  • Raspberry Pi OS (Buster)

  • Raspbian Stretch

  • Debian Buster

  • Debian Stretch

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 Raspberry Pi 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 that your Raspberry Pi is set up, you can see how you can run the starter applications from your terminal: Run a Starter Application.

Note: If you would prefer to set up your Raspberry Pi manually, check out our Raspberry Pi manual setup guide.

To set up your Jetson Device, first download the Jetpack 4.4 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: Some Jetson devices don’t include a WiFi module, in which case you can either connect your Jetson device directly to your laptop using an ethernet cable and share your network, or you can add a USB WiFi adapter and connect the device to the same WiFi network that your laptop is using.

Note: For an in-depth guide on setting up a Jetson Nano, follow along with our Jetson Nano setup guide.

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, 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>

Note: If Docker fails to start during the install, follow the steps outlined on the troubleshooting page.

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!

Learn More