Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 2.09 KB

DEVELOP.md

File metadata and controls

66 lines (47 loc) · 2.09 KB

Develop

Docker Setup

Docker is the preferred environment for development. The Dockerfiles are split into three stages: base, mod, and test.

Docker Overview

Base Images

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.

Mod Images

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 or libargus for camera support.
  • gtest for unit testing.

Test Images

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.

Docker Commands

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

Local Setup

For local development, first install the dependencies for the viam-cpp-sdk. Refer to the example dockerfile for guidance on setting up the environment.

Local Commands

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