dfalbel / torch

torch from R!
http://dfalbel.github.io/torch
Other
50 stars 5 forks source link

Simplify installation #18

Closed dselivanov closed 5 years ago

dselivanov commented 5 years ago

allows to automatically download libtorch

dfalbel commented 5 years ago

Thanks!

On MacOS we need to also download the MLK libraries or maybe create a download link with everything included. I can merge this and fix for MacOS, just let me know.

Also the folllowing didn't work for me:

> devtools::install_github(
+   "dselivanov/torch", 
+   configure.vars = c(
+     "TORCH_HOME=~/libtorch",
+     "TORCH_BACKEND=CUDA", 
+     "CUDA_HOME=/usr/local/cuda"
+   )
+ )
Downloading GitHub repo dselivanov/torch@master
from URL https://api.github.com/repos/dselivanov/torch/zipball/master
Installing torch
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/tmp/RtmpO3PkZd/devtools1b5e4a0ba2ed/dselivanov-torch-9c55308' --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘torch’ ...
----------------------------------------------------------------
TORCH_HOME env var is not set - setting it to: /home/dani/libtorch
TORCH_HOME directory exists - assuming library already installed
TORCH_BACKEND!='CUDA' - using 'CPU' backend
----------------------------------------------------------------

Manually setting the ENV vars worked great!

dselivanov commented 5 years ago

I will update/amend PR