-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix dockerfile #93
fix dockerfile #93
Conversation
Copied from #92 (comment)
You surprised me with this statement, I always thought Since this the cookiecutter which should be "clean", I'd suggest we fix the polluted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this the cookiecutter which should be "clean", I'd suggest we fix the polluted environment.yml and use environment.yml in the Dockerfile instead.
I'm not sure ... we are lazy :) ... and we like to add packages to the conda env like @huard thoughts? |
We have two uses cases:
Ideally we'd use the same environment in both, as this would reduce the likelihood of errors creeping up in prod. Is the additional space required by the "dev" stuff significant ? If not, then I would not mind installing additional packages into the docker image. |
I thought that's what the cookiecutter-birdhouse/{{cookiecutter.project_repo_name}}/Makefile Lines 51 to 54 in 317c4fb
I also have a question: do we prefer Conda or Pip/setup.py? We seems to be using both interchangeably randomly right now. I would thought that we would prefer Conda and fallback to Pip/setup.py only if no Conda package exist. Conda have the advantage that it sandboxes also system package while Pip will need system packages and if these system packages are too old, we are stuck with the old distro version. |
Good point, solved then. |
I have build a docker image with and without test conda packages:
|
What is the solution now?
|
I have updated this PR to proposed solution .... we can still revert/tune it. Docker image size with pytest: 1.46GB |
@tlvu can we use cruft to have a part in the conda |
Related to this discussion is the idea of running the tests suite after the docker build, to ensure that docker images are healthy (#84). To me, this suggests that the docker environment should contain the minimal set of packages to run those tests, or least a subset of the tests. |
does this mean we should add more packages to the conda |
I'm just saying this is a discussion I think we should have, weigh the pros and cons. We could take a few minutes today or next week to discuss this face to face if you want. What's your take on this ? |
Agree with all you said, except hopefully not needed to keep pytest or any dev related package in the production image.
Agreed I think we could do the same trick as
Not sure how I will attack that issue yet but if I can I will live install all the extra test packages at test time so the production image is clear of all unnecessary test packages and to keep the image smaller.
Should we open a separate issue listing the desired goals and current problems so we can get more feedback from other bird developers? For now @cehbrecht you can merge this PR. We can open other PR later for more work. Thanks. |
* fix conda version spec * use conda environment.yml in docker build
Overview
This PR fixes the dockerfile in the template.
Changes:
Related Issue / Discussion
PR #92.
Additional Information