Skip to content

Add torch/LibTorch installation for packages depending on torch - #393

Merged
mpadge merged 3 commits into
ropensci-review-tools:mainfrom
AntoineSoetewey:patch-1
Jul 16, 2026
Merged

Add torch/LibTorch installation for packages depending on torch#393
mpadge merged 3 commits into
ropensci-review-tools:mainfrom
AntoineSoetewey:patch-1

Conversation

@AntoineSoetewey

Copy link
Copy Markdown
Contributor

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

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).
Copilot AI review requested due to automatic review settings July 16, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 torch package.
  • 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.

Comment thread Dockerfile Outdated
@mpadge

mpadge commented Jul 16, 2026

Copy link
Copy Markdown
Member

Thanks for the speedy response @AntoineSoetewey. Can you please put the torch install in the previous install2.r lines, in alphabetical order which should place it below current tidyverse on line 291. Then reduce the 3 comment lines to just the first, leaving at that point just the single line Rscript -e 'torch::install_torch() ? thanks!

@AntoineSoetewey

Copy link
Copy Markdown
Contributor Author

Done, thanks for the review!

@mpadge

mpadge commented Jul 16, 2026

Copy link
Copy Markdown
Member

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

git commit --allow-empty -m "[docker build]"
git push

That will trigger a rebuild as soon as this is merged. Thanks!

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (50a711a) to head (87a8367).
⚠️ Report is 7 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpadge
mpadge merged commit 4157604 into ropensci-review-tools:main Jul 16, 2026
7 checks passed
@AntoineSoetewey

Copy link
Copy Markdown
Contributor Author

Done! Empty [docker build] commit pushed. Thanks again for the quick turnaround!

mpadge added a commit that referenced this pull request Jul 16, 2026
@mpadge

mpadge commented Jul 16, 2026

Copy link
Copy Markdown
Member

@AntoineSoetewey I'll let you know in ropensci/software-review#784 when it's rebuilt and redeployed. That may take several hours.

@AntoineSoetewey
AntoineSoetewey deleted the patch-1 branch July 16, 2026 09:04
etiennebacher pushed a commit to etiennebacher/pkgcheck that referenced this pull request Jul 21, 2026
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

Successfully merging this pull request may close these issues.

3 participants