Developer workflow of AliceVision/Meshlab

318 views
Skip to first unread message

Piotr Praczyk

unread,
Jan 31, 2021, 8:22:11 AM1/31/21
to AliceVision

Hi,

I am not super familiar with the software stack / tools which are used with AliceVision and I have been trying to set myself up to be able to modify AliceVision code and be able to run it from my Meshroom installation. I would be really grateful for some pointers/help on how to do things (I have an impression that what I have done so far is way more complex than what should be done).

Background:
I have been trying to start using Meshroom/Alicevision  for reconstructing some simple scenes.
I have managed with some settings (e.g. depthmaps scaled down 4x), but with most images / settings I constantly experience crashes in the pipeline. Inspecting Alicevision logs does not show anything hinting at the source of problems.
I would like to be able to debug/extend the crashing AliceVision binary to show me more insights into what has happened, so I am trying to build a developer setup.

What I have tried so far:
* I have tried to compile on my local machine with Ubuntu 2020.4 -> I gave up after struggling with dependencies (Either Ubuntu did not have them / had wrong versions or their compilation failed and I was starting to shave a yak spending hours on dependensies of dependencies of the problem I initially wanted to solve).
* I have build Docker image with Alicevision: I have managed to compile it and (after tweaking LD_LIBRARY_PATH inside the container), AliceVision runs (inside the docker image).

Questions:
 * What is the intended developer workflow using those docker images ?
 * Am I expected to run AliceVision inside a docker image or copy out binaries to my system? I have tried the later, but it failed because my Ubuntu has different versions of some of the dependent libraries. At the same time I have not managed to make Meshroom run binaries in a docker (for example over ssh)
  * Am I expected to compile inside Docker / always rebuild the docker image to compile AliceVision/Have source code in a docker image?
* What are the intended usage alicevision-deps image ? I can see that it contains compiled libraries in the /opt directory and AliceVision_git (this directory has only  a singe file inside ?!). Am I expected to run this image, clone the AliceVision repository inside and compile code there ? I have a feeling that this is not what is the intended workflow, but I cannot find any resources.
* Is it possible to run local Meshroom with AliceVision running inside a Docker ?  I can see that Meshroom requires local binaries. Unfortunately (as mentioned before), those do not work when binaries are copied out of docker image (alicevision/alicevision:develop-e84e64c5e-ubuntu20.04-cuda11.0) and resolving all conflicts seems to never end.

I would be grateful for some tips,
Piotr

Simone Gasparini

unread,
Jan 31, 2021, 11:52:20 AM1/31/21
to Piotr Praczyk, AliceVision
Hi,

I don't think that using docker is a handy way to develop/debug your problems.
You can use docker to automatically build the dependencies and copy them into your system.
For ubuntu you should use this docker file
and when you build you should pass this argument 
--build-arg UBUNTU_VERSION=20.04
which will create an installation for the system you are using.

That being said, have you tried to do this
Normally it should work on any ubuntu distribution.
It will build all the dependencies you need and then you can build alicevision.
If you have errors feel free to post them on github issues as other people can help you and/or other people may experience the same issues.

S.


--
You received this message because you are subscribed to the Google Groups "AliceVision" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alicevision...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alicevision/b0107c6a-0c01-4fe2-a42a-fde9259ca7b7n%40googlegroups.com.

Piotr Praczyk

unread,
Jan 31, 2021, 7:37:35 PM1/31/21
to Simone Gasparini, AliceVision
Hi,
Thank you for the answer!

I have tried what you said, but it indeed fails in different dependencies. I am not sure if there is a general approach that AliceVision could take as it comes from incompatible versions/locations of libraries (I have already fixed cuda lib paths, installed older clang etc... but it is still failing on code in dependencies which is probably not correct with the used compiler version, so I will give up this path).

After having looked at this for a while more, I think I will just run a docker image with all necessary ubuntu packages preinstalled and then compile and run both Meshroom and Alicevision there (mounting my home directory from my desktop using the -v option) but edit on the local host. I will compile using mounted directories form the host, so that I can preserve the content between docker sessions.
Looks like the meshroom docker image is what I am looking for.

Thanks,
Piotr


Fabien Castan

unread,
Jan 31, 2021, 8:06:55 PM1/31/21
to Piotr Praczyk, Simone Gasparini, AliceVision
Hi Piotr,
If you are interested, we could make a confcall to discuss about the project, the ways to build, to contribute, etc.
Best,
Fabien


De : alice...@googlegroups.com <alice...@googlegroups.com> de la part de Piotr Praczyk <piotr....@gmail.com>
Envoyé : lundi 1 février 2021 01:37
À : Simone Gasparini <simone.g...@gmail.com>
Cc : AliceVision <alice...@googlegroups.com>
Objet : Re: Developer workflow of AliceVision/Meshlab
 
⚠️ Do not click or open unknown attachments ⚠️ **

Piotr Praczyk

unread,
Feb 2, 2021, 6:02:36 PM2/2/21
to AliceVision
Hi,

Thanks for the previous references.
I have tried doing what I described before and I have arrived at a very convenient setup: 
* docker image with Meshroom + AliceVision + all the libraries + compiler
* mounting host machine's home directory inside docker (and data directory) and compiling+deploying new alicevision / meshroom inside docker image. The build directory stays on the host machine so that compilation does not need to start from scratch every time a new image is created.
* Running meshroom fully within docker (OpenGL using nvidia runtime with a driver implementing direct GLX).
* Editing in an IDE running on the host machine.

This looks like a very convenient setup requiring a single command to get running (+ a bit of fighting with the installation of nvidia docker runtime). I would look into making it submittable (and checking if I can actually do so).
This required minimal modifications to AV/MR:
* Using nvidia-cudagl base docker images (instead of nvidia-cuda) allows to run accelerated OpenGL inside Docker (Meshroom GUI)
* There are small problems with Dockerfile syntax in Meshroom which required fixing
* Some additional packages are useful for running CLI inside docker.

I wonder if this would be useful for others.
Piotr

Chuong Nguyen

unread,
May 30, 2021, 8:56:33 AM5/30/21
to AliceVision
Hi Piotr,
Please share what you were doing so that other could try them out. I am also struggle to compile AliceVision.
Thanks,
Chuong
Reply all
Reply to author
Forward
0 new messages