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

Attempt to get docker image building on a GDAL 3.9 base. #1587

Merged
merged 8 commits into from
May 31, 2024
Merged

Conversation

SpacemanPaul
Copy link
Contributor

@SpacemanPaul SpacemanPaul commented May 28, 2024

Reason for this pull request

The latest osgeo/gdal/ubuntu base images use Ubuntu 24.04 with Python 3.12 and GDAL 3.9

This requires a pretty major uplift of our test docker image build.

Edit: That was a nightmare, but seeing as I actually got working we will run with it at least in the short-term. In the longer term a complete rewrite with something simpler and more maintainable is being discussed.

Proposed changes

  • Added minimum versions for a number of packages that have only recently become Python 3.12 compatible.

  • Manually build (--no-binary) wheels for packages which need to link to GDAL or otherwise do not have 3.12 compatible wheels available on PyPI.

  • Tests added / passed


📚 Documentation preview 📚: https://datacube-core--1587.org.readthedocs.build/en/1587/

--no-binary rasterio
--no-binary fiona
--no-binary shapely
--no-binary cf-units
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyproj?

Copy link
Contributor Author

@SpacemanPaul SpacemanPaul May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pyproj seems to be installing fine from pip without --no-binary - I only added them if the binary wheel didn't work.

Copy link
Member

@Kirill888 Kirill888 May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my suggestion is don't bother with non-conda installs, but this looks like your gdal is missing netcdf support OR your build stage has more libs than your use stage.

conda envs are somewhat larger than pip, but at least you don't have that nightmare to deal with. Alternatively go all out and build EVERYTHING from source and stop mixing pre-compiled things from pip with locally compiled code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I've got it working we'll probably stick with this for the short term. In the longer term, @omad has ideas for a long overdue complete restructure the way tests are run in github (including dropping docker all together). An Issue will be created soon.

Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.78%. Comparing base (9d3c6c1) to head (cd01ca9).
Report is 17 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1587      +/-   ##
===========================================
- Coverage    91.79%   91.78%   -0.01%     
===========================================
  Files          132      132              
  Lines        14633    14633              
===========================================
- Hits         13432    13431       -1     
- Misses        1201     1202       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -853,9 +853,6 @@ def multipoint(coords: CoordList, crs: MaybeCRS) -> Geometry:
"""
Create a 2D MultiPoint Geometry

>>> multipoint([(10, 10), (20, 20)], None)
Geometry(MULTIPOINT (10 10, 20 20), None)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails - looks like shapely has changed the str representation of multipoint geometries.

Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Paul, so much hurt, glad it's working again for now.

@omad omad merged commit 03e920c into develop May 31, 2024
31 checks passed
@omad omad deleted the gdal3.9 branch May 31, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants