Install R on Render

Hello, is there any guide on how to install R on render?

In my Dash app I have rpy2~=3.5.15, but deploy failed on: Error: rpy2 in API mode cannot be built without R in the PATH or R_HOME defined. Correct this or force ABI mode-only by defining the environment variable RPY2_CFFI_MODE=ABI

Within the Dash app, I’m using subprocess to generate RMarkdown pdf file. Locally it works fine, but when I deploy it, nothing happens.

Thank you for any advice.

I’m not an expert on Render, but couldn’t you use a Docker image containing R? I do this for less common languages like Pharo Smalltalk - just put everything into a container and then deploy that (if you create your container in Gitlab, Render can read it straight from that).

Of course it does depend on what you are trying to do, but it might be an option.

1 Like

Could you provide me some guideline on how to do so?

I’ve not used R but a quick google search shows these instructions for running it in a container https://www.appsilon.com/post/r-docker-getting-started

When you can run it in Docker, you can upload that image to a place that Render can access and if you create a Render web app , one of the options is to run a container (like the one described above).

So if you create a Gitlab account, that will let you store a docker container (and render works with gitlab), and then you should be good to go.