-
Notifications
You must be signed in to change notification settings - Fork 8
Don't use bioconda environments in docker image #29
Comments
Didn’t we have that in the beginning and then switched to define a conda environment ? I just can’t remember anymore why and for what reason right now ..... will check this once I got my notebook back .... |
The documentation just states, that one should not create Conda environments in Docker builds, but unfortunately not why. Can someone enlighten me? |
@tiagochst - any ideas why this is the case? Also pinging @tsnowlan - you're not involved in this project at all sorry, but you know your stuff when it comes to Docker so perhaps you have some insight! |
Looks like those are restrictions for the specific DataScience.com platform. They also say not to use As to why they don't like conda environments, I have no idea. I see a number of other pages detailing how to set it up in both docker and singularity. They're from different times in the past few years as well so I don't think it's a matter of new or outdated practice. Might just be something for simplifying their ops requirements. |
Just thinking about best practices. @tiagochst - how did you come across these docs in the first place? Was there a reason that you were referring to them? We currently have a line to avoid needing to activate the conda environment in the container:
I've always felt that this is a little hacky, so using the root environment feels cleaner somehow. But maybe we should keep things simple and stay with the current Dockerfile setup then. After all, it seems to work.. |
You can keep the old way if it was working and it was just a warning. I don't know the reason why use one instead of the another unless I ask who wrote the documentation. I'm not sure how I came to that documentation. But, I would say I found that by chance (I was looking to use conda with github repo, If I'm not wrong) and decided to change if it was working since it was a warning. There was no problem with the last code. |
I have je same feeling: it looks cleaner but thought it’s bad practice to have everything in the root environment. As we are only using this environment in the container and are not creating more than that, I assume it would be fine too and feels a bit cleaner . Also we could get rid of the current special |
@apeltzer - I'm a bit confused. Are you saying that we should make the change or keep it as it is? |
@apeltzer I dont get it now either :D |
But my feeling is, that you go for root environment @apeltzer. I was just curious, if there is a strong reason, not to use conda environments in Dockerbuilds. If this is not the case, I vote for leaving the Dockerfile template as it is now. |
+1 vote for leaving it as it is now if no practical differences. |
+1 |
Hi everyone, No there is no strong reason to NOT use them - only that they require a "hackish" If we at some point find a technical reason why we shouldn't have the conda environments inside the container we can anyways migrate ;-) Sorry for not being more clear with my comments on this |
Ok cool, I think we have consensus 👍 Will close this issue now. |
See nf-core/chipseq#10 (comment) by @tiagochst:
RUN conda env create -f /environment.yml
toRUN conda env update -n root --file environment.yml
because of the source below:https://docs.datascience.com/en/master/appendix-1/dockerfile-basics-and-best-practices-1.html
We should update all pipelines to use this method.
The text was updated successfully, but these errors were encountered: