Docker is the preferred environment for development. The Dockerfiles are split into three stages: base
, mod
, and test
.
The base
stage contains minimal dependency for viam-cpp-sdk module development. This repository includes a jammy
and bullseye
base image for the jetson
and pi
targets respectively. Base images include the following dependencies:
viam-cpp-sdk
for building the module binary.appimage-builder
for packaging into an appimage.docker
for running tets in the CI layer.
The mod
stage includes the module specific dependencies and is derived from the base image. Mod images include the following dependencies:
gstreamer
including good, bad, and ugly plugins.libcamera
orlibargus
for camera support.gtest
for unit testing.
The test
stage is a fresh OS environment used for verifying that the appimage works on a clean setup. This repository includes a L4T
and a bookworm
test image.
make image-mod TARGET=[pi/jetson] # Build binary and create appimage
make bin-mod TARGET=[pi/jetson] # Copy appimage to bin
make image-test TARGET=pi
make test-package TARGET=pi # Test appimage in fresh debian bookworm image
make image-test TARGET=jetson
make test-package TARGET=jetson # Test appimage in fresh L4T image
For local development, first install the dependencies for the viam-cpp-sdk. Refer to the example dockerfile for guidance on setting up the environment.
make build-sdk # Compile and install viam-cpp-sdk
make dep TARGET=[pi/jetson] # Install platform specific dependencies
make build # Build binary
make package TARGET=[pi/jetson] # Build appiamge