I’ve spent a huge amount of time trying to make the recommended solution submission approach using conda & environment.yml work. Naturally, we developed our solution using the latest tidyverse from CRAN, as anyone would.
I keep running into the problem that the main conda channel is outdated and that there’s breaking changes between versions (e.g. in the unnest function). While conda-forge would have the up-to-date packages, it seems that anything I’ve tried like adding conda-forge in the channels at the top of environment.yml and/or adding “conda-forge::” before the relevant packages (and various permutations like specifying individual packages with version numbers etc.) fails.
There seems to be zero documention on how to do this - or even better simply how to use CRAN (just using intall.packages in the code appears to fail due to some compiler issues that are presumably to do with how the evaluation server is configured). Surely, this question has come up before?
Here’s the requested environment.yml (I just added two packages - tidyverse and glmnet plus the conda-forge channel compared to the starter kit environment.yml). The below works fine, if I change tidyverse=1.3.0 to tidyverse=1.2.1 and remove conda-forge from the channels. When I try to do “library(tidyverse)” an image is build “successfully” (not really) and I get “2019-11-25T14:00:07.235091205Z Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, …): 2019-11-25T14:00:07.235120506Z unable to load shared object ‘/srv/conda/envs/notebook/lib/R/library/stringi/libs/stringi.so’:
2019-11-25T14:00:07.235125507Z libicui18n.so.64: cannot open shared object file: No such file or directory 2019-11-25T14:00:07.235128907Z Execution halted”.
- r-glmnet 2.0_16
Creating an apt.txt (and adding it to the commit) that contains
sudo apt-get install libicu-dev
(as per https://stackoverflow.com/questions/13887432/how-to-get-libicui18n-so-36) fails to build the image, similarly, adding
pyicu=2.4.2 to the environment.yml (the other suggestion from the stackoverflow thread) results in a version conflict between python packages.
No details on what was discussed in the call seen in the FAQ. I’d really rather not start to learn about dockerfiles and how to configure one for this particular platform, surely there is a simple solution for something that most R users would want to do?
I’m sorry for posting again, but it seems like I am still spending 80% of the time I can spare for this competition on figuring out by trial-and-error how to install software/work around the particular undocumented limitations on this platform (and yes, I actually have the same Ubuntu version at home). This is pretty frustrating and not really sustainable.
hi @shivam - could you see if you could help Bjoern? And adding the learnings to the FAQ or forums would be great.
@bjoern.holzhauer - you need details on the docker etc? I can connect the two of you via email if it helps.
@ kelleni2 I’d love to simply avoid having to do a docker - all I’m trying to do is using the tidyverse (but not in the outdated version on the main conda channel - but e.g. instead the version from conda-forge or even better the one from CRAN*). I have the hope that this is not such a crazy thing to want…
In the last call, I think Mohanty mentioned an option using an apt.txt (?) file, but I could not get that to work, and I don’t think the recording of the call is available, yet (so I could not double check what he showed). If it has to be a docker, then any additional explanations/help that could be available would be great.
* Mohanty seemed to say they do not enable that, if you have a mixed R+Python pipeline (which happens all the time, if you primarily work from R, because many R packages use Python in the background)
@bjoern.holzhauer: We are on it. We will send you a working version with tidyverse soon. Thanks for your patience.
The issue you are facing was multi-fold due to which it took some time on our side as well to figure best solution for you.
- The procedure you were following was correct except
apt.txt file. This file excepts just the packages name you want to install (although it isn’t the fix/cause of the error). So it should be something like:
~❯ cat apt.txt
But the error still continues as:
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/srv/conda/envs/notebook/lib/R/library/stringi/libs/stringi.so':
libicui18n.so.64: cannot open shared object file: No such file or directory
We found the issue is due to the dependency r-tidyverse -> r-stringr -> r-stringi, and
r-stringi package in conda-forge channel is broken.
- We checked with the recommended channel i.e. r and it had working packages by default, so this should have worked at first place.
[Solution; tldr] But I remember from our call, you needed 1.3.0 version specifically. So, this is the environment.yml entry you need for 1.3.0. Basically getting r-stringr from r channel instead of conda-forge one.
Sorry that you went through long debug cycle.
[Update] I found issue on Github in conda-forge repository as well, and have added the comment about this issue there. https://github.com/conda-forge/r-stringi-feedstock/issues/20
Thank you, great news! This seems to have fully solved this problem, I’m still testing more of what we had in mind, but at least in debug mode it seems to work now.
I guess this illustrates why for R CRAN may be a better choice (given their extensive testing suite for packages).
@bjoern.holzhauer Hi Bjoern were you successful in using
glmnet during evaluation by adding
- r-glmnet 2.0_16 to the environment.yml file? Thx.
r-glmnet=2.0_16 (and conda-forge in the channels) works for me.