Skip to content

This repository contains the code, scripts, and Dockerfiles for setting up different edge machine learning accelerators on different platforms.

License

Notifications You must be signed in to change notification settings

iCAS-Lab/edge-devices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edge ML Accelerators

DISCLAIMER: This repository is not updated very frequently. Thus, some instructions may no longer apply.

This repository contains the code, scripts, and Dockerfiles for setting up different edge machine learning accelerators on different platforms.

Required Software:

  • A computer with an Intel/AMD x86-64 CPU running a 64-bit version of Linux with sudo priveleges (other OSes not tested).

  • Docker

    • See A Note on Docker and Installing Docker
    • For the Intel NCS2, Google Coral Edge TPU, and flashing the NVIDIA Jetson Nano.
    • Optional to install on Raspberry Pi.
    • Installed by default on Jetson Nano via SDK Manager.
  • Internet Access to install software dependencies.

Required Hardware:

Each device has its own requirements for cables, power supplies, and etc. These are listed in the Required Hardware sections of each device. The following are general requirements:

  • Mouse, keyboard, and monitor (Raspberry Pi and Jetson Nano)
  • A host computer with a CPU (Intel NCS2 and Google Coral Edge TPU)

Device Setup Documentation

  • coraltpu - Google Coral Edge TPU setup instructions.
  • jetson - NVIDIA Jetson Nano (2GB and 4GB) setup instructions.
  • ncs2 - Intel Neural Computer Stick 2 setup instructions.
  • raspberrypi - Raspberry Pi setup instructions.

A Note on Docker

Docker is a containerization software that is able to isolate applications and even operating systems. The idea of containers is similar to a Virtual Machine (VM), but without the hypervisor i.e. emulating the hardware which resource demanding. Instead, containers are able to directly work with the computer's hardware and kernel for making more efficient use of system resources than a VM.

Theoretically, all of these devices should work independent of using Docker and in many cases we observed they could. However, for the simplest setup, we recommend using Docker to prevent compatibility issues with your host computer's OS.

Many of the devices require sudo priveleges to install packages and to access the hardware directly. Thus, when running the docker image many of the commands use the --priveleged flag. Using this flag can have certain negative security implications. Please use this with care.

Docker Cheat Sheet

For basic docker CLI commands, users can refer to the Docker Cheat Sheet.

Here are a couple basic commands:

# Download a docker image from dockerhub.com
docker pull <repo>/<image_name>:<tag>
# List your local images
docker images
# List your local containers
docker container ls -a
# Run a docker image for the first time and create a named container
docker run --name <desired_name> -ti <docker_image> <command_to_run_in_container>
# Stop a docker container
docker stop <container_name>
# Start a docker container. ONLY RUN THIS ONCE
docker start -ai <container_name>
# Execute a command inside of the docker container
docker exec -ti <container_name> <command>
# Open a new bash shell in docker container
docker exec -ti <container_name> /bin/bash
# Copy between docker container and host
docker cp <host_filepath> <container_name>:<container_path>
docker cp <container_name>:<container_filepath> <host_path>

Installing Docker

Use the instructions from Docker's official documentation to install docker on your computer.

Be sure to run sudo docker run hello-world to be sure your docker install was successful.

Note: You may need to use sudo docker to elevate permission on some OSes. You can avoid using sudo by adding your username to the docker group via the following command and logging out and back in:

sudo usermod -aG docker username

About

This repository contains the code, scripts, and Dockerfiles for setting up different edge machine learning accelerators on different platforms.

Resources

License

Stars

Watchers

Forks

Packages

No packages published