Skip to content

Problems loading lantern.so when running R CMD check. #1463

Description

@ralmond

I'm working on a package which uses torch. I installed torch by doing

install.package("cuda12.8",repos=...)
install.packge("torch")
torch::install_torch()

Which apparently ran without errors.

Things seem to be working properly when I run my testthat tests. However, when I run
R CMD check to thoroughly test my package, I'm consistently getting the following error:

Warning message:
ℹ torch failed to start, restart your R session to try again.
ℹ You might need to reinstall torch using `install_torch()`
✖ /home/ralmond/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/liblantern.so -
  libcudart.so.12: cannot open shared object file: No such file or directory
Caused by error:
! /home/ralmond/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/liblantern.so - libcudart.so.12: cannot open shared object file: No such file or directory 
Error : Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
Error: unable to load R code in package ‘CPTtorch’
Execution halted
ERROR: lazy loading failed for package ‘CPTtorch’
* removing ‘/home/ralmond/ralmond1/Projects/CPTtorch.Rcheck/CPTtorch’

Checking in my torch directory, I see:

$ ls libcudart*
libcudart-256e6409.so.12  libcudart-c3a75b33.so.12

Is there a missing simlink?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions