[RSDK-11420] - Use conan for cpp-sdk dep#40
Conversation
|
NOTE: need to upload new pi base image with ssl |
| matrix: | ||
| include: | ||
| - container: ghcr.io/viam-modules/csi-camera/viam-cpp-base-jetson:0.0.6 | ||
| - container: ghcr.io/viam-modules/csi-camera/viam-cpp-base-jetson:0.0.8 |
There was a problem hiding this comment.
should you use latest tag so you don't have to change if the image gets updated?
There was a problem hiding this comment.
Good call, created a ticket. Will do in a follow-up PR.
| - name: Verify no dynamic viam library deps | ||
| run: | | ||
| if ldd build-conan/build/Release/viam-csi | grep -i 'libviam'; then | ||
| echo "Unexpected dynamic viam library dependency found" |
There was a problem hiding this comment.
I was using this to make sure libviam is statically linked. CI should fail if we have a missing libviam so dep.
There was a problem hiding this comment.
Removed ldd check
| RUN mkdir -p ${HOME}/opt/src | ||
| RUN apt-get install fakeroot libgtk-3-bin squashfs-tools -y | ||
| RUN apt install python3-pip -y | ||
| RUN apt install python3-pip python3-venv -y |
There was a problem hiding this comment.
do we need both a bullseye and bookworm docker container? if we just had the bullseye it would be compatiable with both bullseye and bookworm.
There was a problem hiding this comment.
We have bullseye for pi targets and l4t flavored ubuntu for jetson targets
(Eventually want to unify to a single path once all deps are statically linked)
Should we investigate this/let SDK team know? |
|
Are there plans to remove the use of appimage in this module? |
Forgot to update the description. I am on an older version of the sdk which does not have the dependencies uploaded to conan. Bumping the SDK after this is merged which should fix the slow build issue. PR |
Summary
Replace the viam-cpp-sdk bundled in Docker base images with Conan package management for both Jetson and Pi targets.
conanfile.pypinningviam-cpp-sdk/0.20.1make build,make package) now go through Conan (conan install+conan build)Dockerfile.base,Dockerfile.base.bullseye)libboost-all-dev,libgrpc++-dev,libprotobuf-dev, etc.)CI Changes
buildjet-2vcputobuildjet-8vcpu(SDK builds from source, OOMs on 2vcpu)actions/cachefor.conan-homeacrossbuild.yml,unit.yml,deploy.yml— first build is ~20min, cached builds are fastconan-build.ymlsmoke check intobuild.ymland deleted the redundant workflowmake conan-testwhich chains install → build → testjetson/pi) to avoid GCC 10/11 cache conflictsBullseye (Pi) Linker Fix
The SDK
libviam_rust_utils.areferences POSIX AIO symbols (aio_read,aio_write, etc.) that live inlibrton Debian Bullseye (glibc 2.31). On Jammy (glibc 2.34+) these are merged into libc. The SDK Conan package declares-lrtbut placeslibviam_rust_utils.alast in link order, after-lrtis already discarded. Fixed with-Wl,--no-as-neededin CMakeLists.txt.Base Images
New base images pushed to ghcr.io with SDK removed (image size ~70% smaller):
Pi image retains
libssl-dev— required by libcamera's meson build to compile IPA module signature verification (libcrypto). Without it, IPA modules can only run in isolated proxy mode, which fails inside AppImages.Test Plan
make build→make package→ ldd clean (no libviam deps) — Canon + CImake build→make package→ ldd clean — Canon + CI0.0.8) with SDK removed0.0.8base images