-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolate R library paths to those in container #541
Comments
Not much to add. The exact warning is:
and seems to be printed every time an R script is invoked, so it can occur multiple times. |
https://rdrr.io/r/base/Startup.html
I wonder if we can just make an empty |
Or we just have an extra line in
and the following in // Export these variables to prevent local Python/R libraries from conflicting with those in the container
env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER=~/.Rprofile
}
Will need to be tested to see if that gets rid of the warnings @mashehu reported. "Most" people will be using containers anyway so we could just take the hit with |
Having 👀 the docs again. It appears we would have to do the same for
I have now added this to the |
Did that help @drpatelh ? :-) |
Yep 👍 This solution works with Conda, Docker and Singularity. For Conda where these files won't be present in the environment the worst case scenario is that the user can |
@drpatelh Thank you for this solution. However, I don't understand how
|
After a lot of trial and error, and testing... specifying |
This also seems to work:
|
Much like we have already done for Python it would be great if any processes that require
R
only look within the container for the associated packages. There have been a number of issues reported where users have reportedR
library/package conflicts when running nf-core pipelines. Most of the time this has been resolved by just renaming/deleting~/.Rprofile
and then re-running. However, this isnt a robust solution.An alternative as tested by @mashehu would be to add an empty
R_PROFILE_USER
tonextflow.config
in theenv
scope:Strictly speaking this variable has to point to a file but that will be quite difficult given the way in which we automate our Docker builds. Unless we add in a separate line to touch an empty file in the container but then this may cause issues with
-profile conda
. If left empty like this then @mashehu suggested that a warning is generated during the pipeline execution. Please fill in the blanks and add more info here @mashehu.See R docs
The text was updated successfully, but these errors were encountered: