tensorflow lite dev setup failing on Ubuntu 22
-
Dear ModalAI,
Below are the steps I took to get tensorflow lite working on a voxl2 sterling drone. The main issue is that the build script on my dev machine is failing on Modal SDK dependencies.
Install Ubuntu Desktop 22.04 on laptop
https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overviewInstall docker
https://docs.docker.com/install/linux/docker-ce/ubuntu/Create a modal ai developer account
https://developer.modalai.com/Download Voxl-cross V4.0
https://developer.modalai.com/asset/eula-download/173Install voxl-docker
https://gitlab.com/voxl-public/support/voxl-dockerRead through the Voxl2 SDK feature page on Deep Learning
https://docs.modalai.com/voxl-tflite-server/Go to the source section to find the Gitlab source code for tensor flow lite on voxl
https://gitlab.com/voxl-public/voxl-sdk/services/voxl-tflite-serverFollow the instructions for chipset qrb5165 (voxl-2)
Failing on step 3. Build scripts. Console log below:./build.sh qrb5165 CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. WARN you're using a deprecated toolchain, please use the new toolchains: WARN qrb5165_ubun1_18.04_aarch64.toolchain.cmake WARN qrb5165_ubun2_20.04_aarch64.toolchain.cmake -- --------------------------------------------------------- -- Using voxl-cross 64-bit toolchain for QRB5165 ubun1 18.04 -- C Compiler : /usr/bin/aarch64-linux-gnu-gcc-10 -- C++ Compiler : /usr/bin/aarch64-linux-gnu-g++-10 -- Sysroot : /opt/sysroots/qrb5165_1 -- C flags : -idirafter /usr/include -march=armv8.2-a -- CXX flags : -idirafter /usr/include -march=armv8.2-a -- EXE Link Flags : -L/opt/sysroots/qrb5165_1/usr/lib/aarch64-linux-gnu -L/opt/sysroots/qrb5165_1/lib -L/opt/sysroots/qrb5165_1/usr/lib -L/usr/lib64 -L/usr/lib -- SO Link Flags : -L/opt/sysroots/qrb5165_1/usr/lib/aarch64-linux-gnu -L/opt/sysroots/qrb5165_1/lib -L/opt/sysroots/qrb5165_1/usr/lib -L/usr/lib64 -L/usr/lib CMake Deprecation Warning at src/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- Configuring done (0.0s) -- Generating done (0.0s) -- Build files have been written to: /home/root/build [ 6%] Building CXX object src/CMakeFiles/voxl-tflite-server.dir/config_file.cpp.o [ 13%] Building CXX object src/CMakeFiles/voxl-tflite-server.dir/inference_handler.cpp.o In file included from /home/root/src/config_file.cpp:1: /home/root/src/../include/config_file.h:37:10: fatal error: modal_json.h: No such file or directory 37 | #include <modal_json.h> | ^~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/voxl-tflite-server.dir/build.make:79: src/CMakeFiles/voxl-tflite-server.dir/config_file.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/root/src/inference_handler.cpp:1: /home/root/src/../include/inference_handler.h:14:10: fatal error: modal_pipe.h: No such file or directory 14 | #include <modal_pipe.h> | ^~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/voxl-tflite-server.dir/build.make:107: src/CMakeFiles/voxl-tflite-server.dir/inference_handler.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:106: src/CMakeFiles/voxl-tflite-server.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
Resolution attempts
Configuring Ubuntu Package manager
https://docs.modalai.com/configure-pkg-manager/Fails on: The repository does not have release file.
This indicates that the Voxl2 SDK does not have Ubuntu 22.04 support yet.Running Docker on the Sterling
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
Policy check indicates no repo is available for docker-ce
apt-cache policy docker-cedocker-ce: Installed: (none) Candidate: (none) Version table:
This leads to no package found
sudo apt install docker-ce Reading package lists... Done Building dependency tree Reading state information... Done Package docker-ce is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: docker-ce-cli:amd64 E: Package 'docker-ce' has no installation candidate
Also tried Modal AI’s docs on docker installation
https://docs.modalai.com/voxl-docker-and-cross-installation/#installing-voxl-dockerFails on docker.com resolve host
curl -fsSL https://get.docker.com -o get-docker.sh curl: (6) Could not resolve host: get.docker.com
-
I'm having the same issue trying to compile the latest tflite-server from gitlab. I haven't even changed any code and it still did not build for qrb5165. It has multiple missing files such as modal_json.h, modal_pipe.h, c_api_internal.h, delegate.h, etc.
I copied and pasted the json and pipe headers from the libmodal repositories from voxl SDK/Code Libs on Gitlab and that fixed the first two. But still got the file not found error.
-
Yes we just saw that there is an issue in the build.
However, it looks like the following workaround is working:
- use
voxl-cross:V2.7
- use
./install_build_deps.sh qrb5165 sdk-1.3
to install the dependencies ./clean.sh
./build.sh qrb5165
Please try!
We will work on fixing the build for
voxl-cross:V4.0
. The native build on VOXL2 is also failing at the moment.Alex
- use
-
@Alex-Kushleyev That worked! Thanks.