Skip to content

Fixing CI - Compiling GDAL for non-windows - #1995

Merged
DodgySpaniard merged 4 commits into
masterfrom
CIfixes
Mar 4, 2026
Merged

Fixing CI - Compiling GDAL for non-windows#1995
DodgySpaniard merged 4 commits into
masterfrom
CIfixes

Conversation

@DodgySpaniard

Copy link
Copy Markdown
Member

No description provided.

 - GDAL is not compiled for non-windows machines (linux/mac).
   + Added gdal to superbuild.
   + Updated dependencies in snapcraft.
   + Set cmake dependencies for Gdal.
   + Added dummy cmake target for Win setup.
 - Downgraded CUDA Docker to 12.x (13.0 removed required headers).
@DodgySpaniard DodgySpaniard changed the title C ifixes Fixing CI - Compiling GDAL for non-windows Feb 28, 2026
@DodgySpaniard
DodgySpaniard marked this pull request as ready for review February 28, 2026 17:39
Comment thread snap/snapcraft.yaml Outdated
- python3-numpy
- python3-setuptools
- swig
stage-packages: - libcurl3t64-gnutls - libgeotiff5

@spwoodcock spwoodcock Mar 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small formatting issue? I don't think we test with the snapcraft.yaml and use snapcraft24.yaml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, fixing it.

In general, I am a bit puzzled about the whole snapcraft thing. It would seem that it is only used to pull the dependencies during configure.sh, and in our CI only Ubuntu 24.04 is used...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Me too! 😆

I guess its useful for anyone wishing to use snap, but my personal preference would be Debian base images and apt packages defined in the Dockerfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can/should remove the snapcraft stuff if you get a chance. The project used to have snap packaging support, but that's no longer the case.

Comment thread gpu.Dockerfile Outdated
### Use a second image for the final asset to reduce the number and
# size of the layers.
FROM nvidia/cuda:13.0.0-devel-ubuntu24.04
FROM nvidia/cuda:12.9.1-devel-ubuntu24.04

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we can save a bit of space using the nvidia/cuda:12.9.1-runtime-ubuntu24.04 image instead of devel here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let me try that.

Comment thread portable.Dockerfile
# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/local/lib/python3.12/dist-packages:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does the standard Dockerfile need to also be updated to use local/lib/python3.12/dist-packages too (now that GDAL goes there)?

Looks like:
gdal --> /code/SuperBuild/install/local/lib/python3.12/dist-packages
pdal --> /code/SuperBuild/install/lib/python3.12/dist-packages
opensfm --> /code/SuperBuild/install/bin

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Probably, I actually forgot about that one. Let me dig around.

@spwoodcock spwoodcock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a much better way that unstable ppas!

No doubt the build is a little longer, but stability is more important.

I managed to build the portable image locally without issue 👍 (on AMD64 arch, Debian machine, final image is 1.62GB)

- Fixing format for snapcraft.yaml
- Swapping GPU image for runtime
- Fixing standard dockerfile runpath
@DodgySpaniard
DodgySpaniard merged commit 44e3ff6 into master Mar 4, 2026
2 checks passed
Comment thread snap/snapcraft.yaml
- python3-setuptools
- swig
stage-packages:
- libcurl3t64-gnutls - libgeotiff5

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry to be a pain - seems like one was missed!

I wonder if snapcraft is smart enough to still parse the yaml despite the syntax issue

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