Skip to content

Opensfm 370 - #2057

Draft
DodgySpaniard wants to merge 83 commits into
masterfrom
opensfm-370
Draft

Opensfm 370#2057
DodgySpaniard wants to merge 83 commits into
masterfrom
opensfm-370

Conversation

@DodgySpaniard

Copy link
Copy Markdown
Member

Current attempt to use latest our ODM/OpenSFM:370 which is synced with OpenSfM/OpenSfM:v1 in addition to our ODM changes.

This branch is sitting on top of pixi and pixi-windows-fix includes commits from Sam. It is currently a WIP, but should contain all require.

Disclaimer: AI was used in a tool capacity to speed up research. (As usual worth mentioning that the use of this tool has been rather helpful to handle all this random build system errors and likely save many hours of stack overflow scouting).

MJohnson459 added 30 commits May 6, 2026 13:11
A devcontainer is a small wrapper around Docker to make it easy to set
up a clean development environment. Most IDE's and code editors support
these now as well as many cloud environments.

I've included a very simple environment to start with which we can
extend as necessary later to streamline the build process.
This diff adds the pixi file and updates some SuperBuild scripts to
compile. With this we can run `pixi install` and `pixi run build` and
the compilation works.
Output report from before and after pixi are almost identical.
roughly a 6 minute build now
MJohnson459 and others added 30 commits June 17, 2026 16:41
Ship the prod pixi conda env (.pixi/envs/prod) + SuperBuild/install +
source instead of the old venv + embedded Python. win32env.bat now
derives CONDA_PREFIX from the install dir and runs the env's conda
activate.d scripts, so the bundle relocates to any install path without
a fix-up step or pixi on the target.

- innosetup.iss: bundle .pixi/envs/prod and all of SuperBuild/install;
  install winrun.bat as run.bat; drop winpostinstall.
- scripts/dist.py + `pixi run dist`: port the installer-build half of
  configure.py (Inno Setup + VC redist download, CUDA runtime bundling
  for GPU SIFT parity, Azure signing, iscc).
- publish-windows.yml: build/package via pixi (gpu env), add
  workflow_dispatch and a relocated-install smoke test.
- Remove obsolete configure.py, vcpkg.json, vcpkg-requirements.txt,
  build_vcpkg_env.yaml, winpostinstall.bat.
The pixi migration deleted configure.sh and requirements.txt, which this
macOS installer script invoked; native macOS builds now go through pixi
(pixi install && pixi run build).
console.bat, win32env.bat and winrun.bat now live in scripts/ alongside
the other helper scripts. The installer still places them at the app root
(DestDir {app}), so the installed layout and their runtime cross-references
are unchanged.
PoissonRecon builds from a hand-written Makefile via `make`, which the
minimal pixi container image does not provide (unlike the CI runners,
which have a system make on PATH). Without it the Docker build failed at
the poissonrecon step with 'make: command not found'.
This is a clunky solution but give we will want to upstream all of these
patches anyway it seems ok for now. It means we can keep them as .patch
files making that transition easier.

In the future, we probably want to relook at how we handle these
external cmake projects but for now I'm avoiding changing too much.
Shapely 2 no longer has `__getitem__` for MultiPolygon, so unary_union
results were written whole instead of picking the largest polygon.
Commit 75a1e1f only fixed one half of that mismatch by changing the
schema to MultiPolygon; Fiona 1.9+ still rejects Polygon records against
a MultiPolygon schema. Use .geoms to select the largest polygon and
declare the GPKG layer as Polygon again.
It seems like we weren't setting the RPATH on MacOS correctly. This
change should bake it into the binary matching how it works on Linux.
Windows uses a fundamentally different kind of dynamic library loading
so we can't easily check it in smoke.py. Instead lets drop it for now.
Declare the standard OCI labels (revision, source, version, created) in the
runtime stage of Dockerfile and gpu.Dockerfile via build args defaulting to
unknown, and inject the values from the publish workflows so published images
can be mapped back to their source commit.
Add the static title, description, url, documentation, licenses and vendor
OCI image labels to the runtime stage of Dockerfile and gpu.Dockerfile.
Add a docker-build pixi task and scripts/docker-build.py that builds the runtime
image with the GIT_COMMIT, BUILD_DATE and IMAGE_VERSION build args derived from
the working tree, so local images carry the same OCI labels as CI. Point the
README build instructions at the task.
Default the docker-build image tag to opendronemap/odm:<branch> when building
off master (sanitising the branch name for Docker), keeping :latest and :gpu on
master, so local branch builds don't clobber the latest tag.
- opendm/remote.py and stages/splitmerge.py, on windows this would
fetch the host python env, patching to force the same interpreter.
- opendm/osfm.py - we do not need win.bat anymore.
Pixi:
- Updating pixi dependencies.
- Runtime gperftools only, fixes from spwoodcock (commits 6c47d7f, 2038f0d)
cmake:
- Removed aarch64 guard (nuked upstream).
- Linked to Opensfm:370 OpenSfM sha.
- Updated CMake install.
…uracy

opensfm no longer supports planar algo, and applies anisotropic GPS weighting
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