Add torch/LibTorch installation for packages depending on torch - #393
Conversation
As discussed in ropensci/software-review#784, packages importing torch fail to build in the check environment because LibTorch is not available. This installs the torch package and LibTorch at image build time, following the placement suggested by @mpadge. With TORCH_INSTALL=1 set, the same commit passes all checks (see joshuamarie/kindling#34).
There was a problem hiding this comment.
Pull request overview
Installs the R torch package and its required LibTorch runtime during image build so R packages that import torch can build and run tests successfully in the pkgcheck environment.
Changes:
- Add a Docker build step to install the R
torchpackage. - Run
torch::install_torch()during the image build to provision LibTorch inside the container.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for the speedy response @AntoineSoetewey. Can you please put the torch install in the previous |
|
Done, thanks for the review! |
|
@AntoineSoetewey Can I ask you to do one more thing please? The Docker image is generally only build on schedule. In order to immediately rebuild with this change, can you please do this: That will trigger a rebuild as soon as this is merged. Thanks! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
=======================================
Coverage 92.12% 92.12%
=======================================
Files 52 52
Lines 3748 3748
=======================================
Hits 3453 3453
Misses 295 295 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Done! Empty [docker build] commit pushed. Thanks again for the quick turnaround! |
add @AntoineSoetewey to allcontribs for #393 - thank you
|
@AntoineSoetewey I'll let you know in ropensci/software-review#784 when it's rebuilt and redeployed. That may take several hours. |
As discussed in ropensci/software-review#784, packages importing torch fail to build in the check environment because LibTorch is not available. This installs the torch package and LibTorch at image build time, following the placement suggested by @mpadge. With TORCH_INSTALL=1 set, the same commit passes all checks (see joshuamarie/kindling#34).