-
Notifications
You must be signed in to change notification settings - Fork 38
Dockerfile: use uv for build #1238
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
Conversation
This workflow does not need the entire source tree.
We only use releases and those do not change, so pin by hash. This protects from a compromised GDAL repository changing the tag to point to something dangerous.
Put the basic package installation early, and split out the build-arg dependent part into a separate RUN statement so the first RUN statement can be cached.
Make Python flush things immediately and stop leaving __pycache__ directories in the file system.
18b532b
to
c679056
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1238 +/- ##
===========================================
- Coverage 93.58% 93.38% -0.20%
===========================================
Files 53 53
Lines 7096 7125 +29
===========================================
+ Hits 6641 6654 +13
- Misses 455 471 +16 🚀 New features to boost your workflow:
|
The deployment image shrinks from 1.39GB to 1.07GB with this PR, and the build becomes reproducible since it's using locked dependencies. The image builds don't seem to hit more than 40% cache for some reason, but the image build now takes less than 90 seconds when it does hit the cache. |
b6eefd3
to
76113e0
Compare
Use uv for building the Docker image.
This also shuffles things around a bit to improve the Docker cache hit rate. When building locally, this will also cache uv itself as well as the deb packages.
📚 Documentation preview 📚: https://datacube-ows--1238.org.readthedocs.build/en/1238/