Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile not building vrs CLI? #30

Open
Andrew12Liu opened this issue May 5, 2023 · 8 comments
Open

Dockerfile not building vrs CLI? #30

Andrew12Liu opened this issue May 5, 2023 · 8 comments
Assignees

Comments

@Andrew12Liu
Copy link

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
Copy link
Author

Andrew12Liu commented May 5, 2023

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.

@SeaOtocinclus
Copy link
Contributor

SeaOtocinclus commented May 5, 2023

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:
...

@Andrew12Liu
Copy link
Author

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

@SeaOtocinclus
Copy link
Contributor

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

@Andrew12Liu
Copy link
Author

@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.

@SeaOtocinclus
Copy link
Contributor

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

@SeaOtocinclus
Copy link
Contributor

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

@SeaOtocinclus SeaOtocinclus self-assigned this May 8, 2023
@Andrew12Liu
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants