Aria_data_tools icon indicating copy to clipboard operation
Aria_data_tools copied to clipboard

Dockerfile not building vrs CLI?

Open Andrew12Liu opened this issue 2 years ago • 8 comments

Hi Aria team,

I was running the dockerfile to build aria-data-tools. I noticed that the build directory did not build the VRS CLI. More specifically, I noticed the build subdirectory for vrs under the third-party directory was missing the tools build directory associated with the CLI from my understanding. My logic could be wrong so would appreciate any help on this. Thank you!

Andrew12Liu avatar May 05 '23 21:05 Andrew12Liu

For more context, I ran cmake -S <path_to_vrs_folder> -B <path_to_build_folder> '-GCodeBlocks - Ninja' from following this https://github.com/facebookresearch/vrs on the vrs subrepository to a new build folder just for vrs and it correctly built the vrs CLI.

Andrew12Liu avatar May 05 '23 21:05 Andrew12Liu

Hello @Andrew12Liu we recently changed the way dependencies are managed and now VRS is used directly as a module, not a precompiled library (as a consequence, we are not building by default the tools).

If you are in the docker aria-data-tools you can build the binary by triggering make -j vrs from the aria_data_tools build folder.

Comment line 32/33 here https://github.com/facebookresearch/Aria_data_tools/blob/main/src/CMakeLists.txt#L32 and remove the EXCLUDE_FROM_ALL

Then run cmake and make -j vrs

git clone https://github.com/facebookresearch/Aria_data_tools.git
cd Aria_data_tools/
git submodule init
git submodule update
podman build . -f Dockerfile -t aria_data_tools_ubuntu
podman run -it aria_data_tools_ubuntu /bin/bash

=> Edit the CMakeLists as shared above
apt-get install nano
nano /opt/aria_data_tools/src/CMakeLists.txt

cd /opt/aria_data_tools_Build/
rm -rf ./*
cmake ../aria_data_tools/src/
make -j vrs

...
Scanning dependencies of target vrs
[100%] Building CXX object third_party/vrs/tools/vrs/CMakeFiles/vrs.dir/VrsCommand.cpp.o
[100%] Building CXX object third_party/vrs/tools/vrs/CMakeFiles/vrs.dir/vrs.cpp.o
[100%] Linking CXX executable vrs

root@8d01e916ea7b:/opt/aria_data_tools_Build# ./third_party/vrs/tools/vrs/vrs 
Get details about a VRS files:
  vrs [ file.vrs ] [filter-options]

All the other commands have the following format:
...

SeaOtocinclus avatar May 05 '23 22:05 SeaOtocinclus

thanks for the rapid response time @SeaOtocinclus , presumably if i want my docker image to have the vrs tools, ill just add

cmake ../aria_data_tools/src/
make -j vrs

to the dockerfile

Andrew12Liu avatar May 05 '23 22:05 Andrew12Liu

Thank you for your feedback, feel free to contribute its addition back to the repository ;-)

SeaOtocinclus avatar May 05 '23 22:05 SeaOtocinclus

@SeaOtocinclus thanks for the help, that seemed to do the trick, all i had to do was make install it afterwards. happy to add this in a PR, I currently have it in a fork's PR.

Andrew12Liu avatar May 05 '23 23:05 Andrew12Liu

Great, happy to see we were able to found a quick solution!

SeaOtocinclus avatar May 05 '23 23:05 SeaOtocinclus

Do you want to close the issue, or keep it open until we have VRS compiled in the docker image?

SeaOtocinclus avatar May 06 '23 00:05 SeaOtocinclus

@SeaOtocinclus im okay with closing it, as we found the resolution. I am indifferent on having VRS compiled in the docker image. Perhaps other users may not need it. Adding a note in the build readme or documentation could clarify for future users.

Andrew12Liu avatar May 08 '23 18:05 Andrew12Liu