Skip to content
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

Export conda environment in Docker file #349

Closed
drpatelh opened this issue Jun 19, 2019 · 6 comments
Closed

Export conda environment in Docker file #349

drpatelh opened this issue Jun 19, 2019 · 6 comments
Labels
template nf-core pipeline/component template

Comments

@drpatelh
Copy link
Member

Would be nice to create a file with all of the packages used to create the Conda environment within the Docker container. This will be useful to recreate the same conda environment for downstream analysis in order to use the same tools (maybe add others), and hence adhere to reproducibility.

It should be as simple as translating and adding the command below into Docker language with the use of cookiecutter:
conda env export --name nf-core-atacseq-1.0.0 > nf-core-atacseq-1.0.0.yml

@drpatelh drpatelh added good first issue template nf-core pipeline/component template labels Jun 19, 2019
@ewels
Copy link
Member

ewels commented Jun 19, 2019

Docker language: Just add RUN before the bash statement. That's all :)

Would be nice to have it work for -profile conda as well though if possible...

@ewels
Copy link
Member

ewels commented Oct 5, 2019

@hpatel - going back over this, to clarify you mean because this pins all of the dependency package versions as well?

Should this file be saved to the pipeline results as well? Or is it sufficient to just have it inside the Docker container? Might be tricky to save it to results in such a way that still works if people are using homebrew software installations..

@drpatelh
Copy link
Member Author

drpatelh commented Oct 5, 2019

I think it's fine to have it inside the Docker container 👍 and then export the environment if required.

@drpatelh drpatelh closed this as completed Oct 5, 2019
@drpatelh drpatelh reopened this Oct 5, 2019
@drpatelh
Copy link
Member Author

drpatelh commented Oct 5, 2019

Itchy trigger finger 🔫 Still need to add the relevant RUN command to the Dockerfile in the pipeline template.

@ewels
Copy link
Member

ewels commented Oct 6, 2019

So... if the file is in the docker image, and you need to shell into the container to get to it. Then why don't you just shell into the container and export the environment yourself?

@drpatelh
Copy link
Member Author

drpatelh commented Oct 7, 2019

Because its easier to copy a file than to work out how to generate it 😅 Also, just so it can be said that all of the dependencies required to create the environment are in a file in the container. Not a biggie to be honest. Just thought it would help with transparency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template nf-core pipeline/component template
Projects
None yet
Development

No branches or pull requests

2 participants