Skip to content

Instantly share code, notes, and snippets.

@hmahadik
Last active September 6, 2023 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmahadik/590511ec59ed51b536318bb4e6747779 to your computer and use it in GitHub Desktop.
Save hmahadik/590511ec59ed51b536318bb4e6747779 to your computer and use it in GitHub Desktop.
Set up docker and brinq edge ai on NavQ+

Note: Make sure you resize the root partition so that it uses all of available disk space on the Micro SD card. At least 6 GB of free space is needed (10+ GB is ideal).

Table of Contents

Set up docker

Enable docker service so that it automatically starts on boot

sudo systemctl start docker

Add yourself to the docker group so that you can run the docker command without sudo

sudo usermod -a -G docker $USER

Workaround for NAVQP-141 (docker takes too long to come up in Release 1.1.5)

sudo perl -pi -e "s/\/systemd-networkd-wait-online/\/systemd-networkd-wait-online --any/" /lib/systemd/system/systemd-networkd-wait-online.service

Reboot

sudo reboot now

Install Brinq

Sets up Brinq for the first time.

Install the current stable release:

docker pull arcturusnetworks/imx8mpnavq:5.15.71
docker rm -f streamproc
docker create --name streamproc arcturusnetworks/imx8mpnavq:5.15.71
docker cp streamproc:/usr/share/streamproc ~
cd ~/streamproc
docker-compose up -d

Or install the preview release (unstable):

docker pull arcturusnetworks/imx8mpnavq:nightly
docker rm -f streamproc
docker create --name streamproc arcturusnetworks/imx8mpnavq:nightly
docker cp streamproc:/usr/share/streamproc ~
cd ~/streamproc
docker-compose -f docker-compose.yml -f docker-compose.nightly.yml up -d

Brinq Edge AI can then be accessed at http://ip-address-of-imx8mpnavq.

Pull the latest version

Upgrades an existing Brinq installation to the latest version of the stack.

If you've currently installed the stable release:

cd ~/streamproc
docker-compose down -t 0
docker-compose pull
docker-compose up -d

Or if you've installed the preview release (unstable):

cd ~/streamproc
docker-compose -f docker-compose.yml -f docker-compose.nightly.yml down -t 0
docker-compose -f docker-compose.yml -f docker-compose.nightly.yml pull
docker-compose -f docker-compose.yml -f docker-compose.nightly.yml up -d

If you run into any issues after pulling the latest, try factory resetting.

Reset to Factory Defaults

Removes all configuration changes, events, and videos, and restores default configuration.

If you've currently installed the stable release:

cd ~/streamproc
docker-compose down -t 0 -v
sudo rm -rf ~/streamproc
docker rm -f streamproc
docker create --name streamproc arcturusnetworks/imx8mpnavq:5.15.71
docker cp streamproc:/usr/share/streamproc ~
cd ~/streamproc
docker-compose up -d

Or if you've installed the preview release (unstable):

cd ~/streamproc
docker-compose down -t 0 -v
sudo rm -rf ~/streamproc
docker rm -f streamproc
docker create --name streamproc arcturusnetworks/imx8mpnavq:nightly
docker cp streamproc:/usr/share/streamproc ~
cd ~/streamproc
docker-compose -f docker-compose.yml -f docker-compose.nightly.yml up -d

Remove docker data

Removes all downloaded images, containers, volumes, and networks created by Brinq.

cd ~/streamproc
docker-compose down -t 0 -v --rmi all --remove-orphans &> /dev/null
docker rmi -f $(docker images -q arcturusnetworks/*)

Remove Brinq data

Removes all configuration changes, events, and videos.

sudo rm -rf ~/streamproc

Troubleshooting

Errors while bringing up the project

Sometimes you may run into the following error when bringing up the stack:

Creating influxdb        ... done
Creating mediamtx        ... done
Creating postgresql      ... done
Creating watchman-server ... done
Creating watchman-client ... done
Creating manager         ... done
Creating telegraf        ... done
Creating grafana         ... done

ERROR: for worker  Container "e1f18556d618" is unhealthy.
ERROR: Encountered errors while bringing up the project.

Wait a few seconds and retry bringing up the stack

user@imx8mpnavq-hash:~/streamproc$ docker-compose up -d
influxdb is up-to-date
postgresql is up-to-date
mediamtx is up-to-date
watchman-server is up-to-date
telegraf is up-to-date
manager is up-to-date
grafana is up-to-date
watchman-client is up-to-date
Creating worker ... done

Viewing logs

View timestamped logs of the docker containers

cd ~/streamproc
docker-compose logs --timestamps --tail 10000

View system logs

sudo journalctl -ef
sudo dmesg -wH

Additional Links

The follow resources and links available to support NAVQ+ development

Arcturus - Brinq Smart Camera Software

Emcraft Hardware

NXP Hardware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment