mlverse / torch

R Interface to Torch
https://torch.mlverse.org
Other
483 stars 66 forks source link

Question about installation from pre-built binaries #1179

Open sebffischer opened 2 days ago

sebffischer commented 2 days ago

The installation guide mentions that it is possible to install torch from pre-built binaries on linux, but when following the installation instructions, I get:

install.packages("torch", type = "binary")
Error in install.packages("torch", type = "binary") : 
  type 'binary' is not supported on this platform

Does this only work on specific linux distributions or should this work in general? I get the same results on CentOS 7 and Ubuntu 22.04

sebffischer commented 2 days ago

So the problem is that .Platform$pkgType shows "source"

dfalbel commented 2 days ago

I recently updated this to type="binary" unaware of this error on Linux. If you do install.packages("torch") after setting up the repository, you should get the pre-built binaries anyway in all platforms.

sebffischer commented 1 day ago

Thanks for the quick response! :) What do you think abou trunning the installation instructions in the CI to ensure that they are working?

dfalbel commented 1 day ago

I think that would be nice, although they shouldn't change much. I don't remember why I did this change https://github.com/mlverse/torch/commit/547b5640839e0cbe1fb32863d6ef3ae69bf7724d unfortunatelly.