Hello,
I managed to create a Binder and was able to launch it. However, now after some time I was trying to rebuild it and struggle with the following error. Does anyone have an idea? The IRkernel package is not coming from my specification.
.binder files: aquainfra-usecase-Daugava/.binder at containerize · AstraLabuce/aquainfra-usecase-Daugava · GitHub
Binder: Binder
It looks like you based your approach on here. If you click here to try to launch from there, you’ll see the example encounters the same thing.
So for now, this way isn’t working. I don’t have time to look around on this forum right now, but I thought this was pointed out a few weeks or months ago. (It may have been related to use of ‘Shiny’?) If so, looking there may offer you more insight.
If you go to the section ‘Specifying an R environment with a runtime.txt file’ of the ’ Sample Binder Repositories’ documentation page in the Binder User guide, you’ll see there is a note warning against using that as a basis." We recommend to follow r-conda instead." That leads to here.
And I can attest that currently works well to get an R kernel as it both works in launches from the guide version (see note below though) and works here in launches from my repo based on it.
Note: With the r-conda demo site there is an issue with the example ‘Jupyter + R’ that I have asked to be fixed.
Sorry, it was Dash that was the issue here. So what I was thinking of didn’t involve that repo using runtime to run R.
Looking at your repo though it looks like you can possibly convert it to using environment.yml
with guidance from my last post?
I know it doesn’t pertain to OP, yet because I raised ‘Shiny’ in this thread though, for the sake of others getting here:
Sorry, it was Dash that was the issue here. Not Shiny.
I had though raised issues about Shiny a long time ago here. I don’t know if it ever was workin in the interim there.
I will point out in regards to Shiny presently, there is py.cafe. It says ‘Shiny for Python’ though and I don’t know how easy the conversions are though.
There are a few pending repo2docker PRs related to R
https://github.com/jupyterhub/repo2docker/pulls
Mostly waiting on someone to build and run the PR to confirm it’s working as expected since we don’t have any UI tests for Rshiny or Rstudio.
Thanks so far! I am currently trying to convert it to an environment.yml but struggle with some version conflicts because of r-terra, which comes in version 1.7-46 though 1.8.5 is required by the library mapview. Anyway, I will keep trying.
I just looked at a version you had updated 5 minutes ago (this one here I believe).
A couple of things:
- Ideally, do not pin things at the outset. Or at least keep it to minimum. Let conda sort it out. Only pin once you determine a combination that works & only if you are sure you’ll need it. It may be best to at least just record the combination that works so you can recover later if things change out of sync, as sometimes happens.
- I also thought you couldn’t have
defaults
there under channel anymore and have it build completely? That was the case when I had investigated here. Or at least it is definitely not recommended.
You can still install with R if that helps you in your case, too. My repo has an example where I use an R script to install a library as well.
Alright, I think I am one step further. I removed the versions and defaults from the env.yml. It’s just strange that the libs mapview and tmap don’t work as they expect r-terra>=1.8.5.
If I install mapview locally, it installs r-terra=1.8.15 but when I install r-tmap afterwards, it wants to downgrade r-terra to 1.7_83, although it also actually requires 1.8.5. I will continue playing a bit with the env.yml :).