Install rstan on Azure Databricks (Spark)

I’m trying to install rstan on an azure databricks cluster (it’s basically a managed Spark cluster with notebooks).
The problem I’m getting is that I can’t install V8. I had the same problem on my laptop (running Manjaro Linux) but there I managed to install V8 via the OS and link R to it.
On databricks I don’t think I can install V8 on the system, but I’m not sure. Has anyone faced this kind of problems and managed to install rstan on databricks?

Thanks!
Omri

The development version of the V8 package has an option to download a static version of the V8 library. More info in this github issue: https://github.com/stan-dev/rstan/issues/831#issuecomment-717614929

To use, run:

Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1)
remotes::install_github("jeroen/V8")
4 Likes

Wow, that was a quick reply! Thank you so much!

I will try it now and report back :)

1 Like

That solution worked great, though it took a really long time to run on databricks, which is a shame considering that this has to run every time after a cluster restarts (which is often daily).