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

How do you keep track of per-pkg system libraries? #46

Closed
jasonh-logic2020 opened this issue Mar 26, 2020 · 2 comments
Closed

How do you keep track of per-pkg system libraries? #46

jasonh-logic2020 opened this issue Mar 26, 2020 · 2 comments

Comments

@jasonh-logic2020
Copy link

I'm building custom images containing R libs (among other things) using GoogleContainerTools/distroless/package_manager. I have worked though collecting and adding R deps to packages.csv so all of my R world dependencies are fine.

But those R libraries have system library dependencies. When you load the R libraries in R code, they look for the system libraries they use, and throw at the first one they can't find.

I am not a native R person, so please forgive me if this is a stupid question: is there any way to find the native deps of R libraries? Iterating over this is really time consuming at scale.

Any help appreciated.

@siddharthab
Copy link
Collaborator

Hi, unfortunately there is no easy way. You could parse the DESCRIPTION files of all the packages in your workspace, and look at the list of SystemRequirements, but that is also not a guarantee.

To parse the DESCRIPTION file of all the packages, you can use this command.
Before running the command, you need to ensure all remote repos are fetched using bazel fetch or bazel sync.

bazel query 'kind(r_repository, //external:*)' | sed -e "s@.*:R_\(.*\)@$(bazel info output_base)/external/R_\1/\1/DESCRIPTION@" | xargs grep SystemRequirements

At GRAIL, installing these apt packages allow us to build 400+ packages from CRAN and Bioconductor.

libcurl4-openssl-dev
python3-pip
libgsl-dev
libmariadb-client-lgpl-dev
libomp-dev
libpq-dev
librsvg2-2
libssl-dev
libxml2-dev
libv8-3.14-dev

For r_markdown rules, you will also need pandoc and texlive-latex-extra.

Please feel free to close this issue when you feel like your question has been answered.

Thanks!

@siddharthab
Copy link
Collaborator

Closing because of no activity.

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