-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Migrated docker image from miniconda to manylinux2014 #3874
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3874 +/- ##
===========================================
- Coverage 99.60% 99.60% -0.01%
===========================================
Files 259 259
Lines 21273 21270 -3
===========================================
- Hits 21189 21186 -3
Misses 84 84 ☔ View full report in Codecov by Sentry. |
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.
Thanks for taking this up, @santacodes!
Here's a list of what else we would need from this PR, besides these changes:
Also, could we get an estimate on the compressed size of the image? The ones we currently push are ~1.6 GB, so remaining close to somewhere around that would be great. |
Sure I'd try to minimize the image size as much as possible and update you on the estimate |
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.
python base image looks much more valid as compared to manylinux, I'd request you to run test suite inside the running docker container at least once and see how many tests are getting skipped.
Plus confirm the solver availability inside the container by executing:
pybamm.have_idaklu()
pybamm.have_jax()
pybamm.have_scikits_odes()
All of the three methods return true inside the docker container running python venv. I also did run the test suite before pushing the commit, 1 test in each unit and integration tests were getting skipped, I am not exactly sure of the cause. I am awaiting on @agriyakhetarpal response on testing it on ARM. |
Upon further researching on PEP599 the manylinux2014 platform tag which demands for the container to be compliant with Most of the docker containers which have a constant maintenance use Debian/Ubuntu, RHEL or Alpine based distributions in their containers to maintain their integrity. In reference to the above distributions, these are the OS releases that fulfill
To not do things the hacky way the official Python Bullseye image would make things a bit simple as the base image itself supports multiple architectures and is based on Debian. The size would also not be an issue as there's a slim version of the image and would have a constant support and maintenance for a while. Upgrading to a newer version or migrating would also become easier as the dependencies would be compatible. By default the Python Bullseye image provides |
Thanks for looking into this @santacodes – yes, a Python bullseye image makes sense too as @arjxn-py mentions. The manylinux2014 images are indeed architecture-specific implementations of PEP 599 and therefore won't have support for multiple architectures from a single @santacodes when pulling this branch I noticed that these changes have been made on the Could you create a new PR based on these changes, and close this one? You can check out a new branch from the current changes and that should bring your commits there (or you can cherry-pick the commits too – whichever you find easier). |
Actually, testing this on ARM on macOS has revealed a bug in our current PyBaMM Docker images that we have been pushing to Docker Hub since some while:
this unresolved symbol We can keep this PR open for a while – what I remember is that this did work on aarch64 earlier, but somewhere down the line this ended up breaking and therefore the IDAKLU solver cannot be instantiated |
Closed this due to messy branches on my side, will make a new draft with those previous commits for future reference. |
Description
Migration from conda virtual environment to venv and using Centos 7 based manylinux2014 as base image for docker which is compliant with PEP599.
Fixes #3692 and fixes #3666
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: