# Question about building custom applications, docker images and dependencies

Source: https://forum.modalai.com/topic/2724/question-about-building-custom-applications-docker-images-and-dependencies
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Tags: voxl-sdk
Posted: 2023-10-05 09:14:44 UTC by peterkrull
Replies: 5 · Views: 2228

## peterkrull · 2023-10-05 09:14:44 UTC

I will preface by saying I am a novice as both working with docker, and working with complex C++ code bases for cross-compilation.

I am attempting to make a custom vio-server for the VOXL 2 which bases its estimation on an open source VIO solution from a science paper, specifically DM-VIO My plan is to start with the voxl-qvio-server, pull out the mvVISLAM guts and replace the relevant parts with the equivalent DM-VIO parts. DM-VIO however requires GTSAM as a dependency, which has to be compiled and installed. Is it right that I would have to to compile and install GTSAM inside docker (qrb5165-emulator)? From my experience compiling GTSAM natively on my PC, I know it is very slow. In addition, I have had issues with the compilation consuming large amounts of ram, eventually bringing everything to a crawl. Having to do this every time i restart the docker would not be viable. Maybe I am doing something completely wrong?

By the way, I am on a Windows machine running a Ubuntu 20.04 install through WSL, which also launches the docker image. Perhaps this is suboptimal, but I could not get voxl-docker work natively in Windows.

## Reply by Eric Katzfey (ModalAI staff) · 2023-10-05 15:31:02 UTC

@peterkrull If you make changes to a Docker you can preserve them with the Docker `commit` command. https://docs.docker.com/engine/reference/commandline/commit/

## Reply by peterkrull · 2023-10-06 07:32:27 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Thanks, that seems to be exactly what I need. I also figured out that GTSAM with the GCC compiler is what caused the extreme memory usage and eventual failed compilation, changing to Clang helped. It is right that I am using the qrb5165-emulator and not the voxl-cross image? I believe some parts of the documentation recommend using the voxl-cross for new development, but I could not get it to build the voxl-qvio-server out of the box.

## Reply by Eric Katzfey (ModalAI staff) · 2023-10-06 15:12:18 UTC (in reply to peterkrull)

@peterkrull The choice between voxl-cross and qrb5165-emulator usually comes down to dependencies. voxl-cross is a much faster way to build but it provides a minimal environment and so if will often lack needed dependencies for more complex applications. The emulator actually has the voxl2 file system in it so has many more dependencies in the environment already. The documentation for voxl-qvio-server states that you need the emulator https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server#build-instructions-1

## Reply by peterkrull · 2023-10-09 10:04:18 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Yea I found out about the dependencies the hard way by spending some hours trying to figure out why my installed dependencies were not accepted by Cmake. Of course because they were installed as amd64. Apart from slower compilation, what is the argument against using the qrb5165-emulator?

## Reply by Eric Katzfey (ModalAI staff) · 2023-10-09 16:03:23 UTC (in reply to peterkrull)

@peterkrull I think qrb5165-emulator is a fine choice.
