Skip to content

Commit ff00047

Browse files
24.04 (#1904) (#1942)
* Changes to support building on Ubuntu 24.04 and windows-2022 Github runner. * Update Python to 3.12 * Install dependencies in virtual environment * Run python scripts from the virtual environment) * Update dependencies * Ubuntu dependencies in snap/snapcraft24.yaml * Python dependencies in requirements.txt * Windows dependencies built in OpenDroneMap/windows-deps repo * Update CUDA * 12.8.1 on Windows * 13.0.0 on Ubuntu) * Run tests as part of docker build * Use exact commits to specify dependencies that are built from source, instead of branch names * Use upstream versions of Libraries: * PDAL * PDAL-Python * untwine * ExifRead * draco * Build windows builds with -j2 * Use Micasense's latest version of dls.py * Update failing unit tests to match current behavior Co-authored-by: Stephen Mather <[email protected]>
1 parent 0080422 commit ff00047

38 files changed

+587
-198
lines changed

.dockerignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Dockerfile
2-
tests/test_data
32
SuperBuild/build
43
SuperBuild/download
54
SuperBuild/install
@@ -18,8 +17,6 @@ images_resize
1817
/hooks
1918
/img
2019
/license
21-
/tests
22-
tests.sh
2320
settings.yml
2421
code_of_conduct.md
2522
configure_18_04.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build Windows Dependencies
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
windows:
8+
runs-on: windows-2022
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Set up vcpkg
14+
run: |
15+
git clone https://github.com/microsoft/vcpkg.git
16+
.\vcpkg\bootstrap-vcpkg.bat
17+
18+
- name: Install vcpkg dependencies
19+
run: .\vcpkg\vcpkg.exe install --triplet x64-windows
20+
21+
- name: Export vcpkg dependencies
22+
run: .\vcpkg\vcpkg.exe export --zip --output=vcpkg-export --output-dir=.
23+
24+
- name: Upload artifact
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: vcpkg-env-x64-windows
28+
path: vcpkg-export.zip

.github/workflows/publish-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
- name: Setup Python
1717
uses: actions/setup-python@v2
1818
with:
19-
python-version: '3.8.1'
19+
python-version: '3.12.10'
2020
architecture: 'x64'
21-
- uses: Jimver/[email protected].4
21+
- uses: Jimver/[email protected].24
2222
id: cuda-toolkit
2323
with:
24-
cuda: '11.4.0'
24+
cuda: '12.8.1'
2525
- name: Setup cmake
2626
uses: jwlawson/[email protected]
2727
with:

.github/workflows/test-build-prs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ jobs:
4949
# isClassic: 'false'
5050

5151
windows:
52-
runs-on: windows-2019
52+
runs-on: windows-2022
5353
steps:
5454
- name: Checkout
5555
uses: actions/checkout@v2
5656
- name: Setup Python
5757
uses: actions/setup-python@v2
5858
with:
59-
python-version: '3.8.1'
59+
python-version: '3.12.10'
6060
architecture: 'x64'
61-
- uses: Jimver/[email protected].4
61+
- uses: Jimver/[email protected].24
6262
id: cuda-toolkit
6363
with:
64-
cuda: '11.4.0'
64+
cuda: '12.8.1'
6565
- name: Setup cmake
6666
uses: jwlawson/[email protected]
6767
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ storage/
3232

3333
vcpkg/
3434
venv/
35-
python38/
35+
python312/
3636
dist/
3737
innosetup/
3838
.DS_Store

Dockerfile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM ubuntu:21.04 AS builder
1+
FROM ubuntu:24.04 AS builder
22

33
# Env variables
44
ENV DEBIAN_FRONTEND=noninteractive \
5-
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.9/dist-packages:/code/SuperBuild/install/lib/python3.8/dist-packages:/code/SuperBuild/install/bin/opensfm" \
5+
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
66
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
77

88
# Prepare directories
@@ -11,24 +11,25 @@ WORKDIR /code
1111
# Copy everything
1212
COPY . ./
1313

14-
# Use old-releases for 21.04
15-
RUN printf "deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse" > /etc/apt/sources.list
16-
1714
# Run the build
1815
RUN bash configure.sh install
1916

17+
# Run the tests
18+
ENV PATH="/code/venv/bin:$PATH"
19+
RUN bash test.sh
20+
2021
# Clean Superbuild
2122
RUN bash configure.sh clean
2223

2324
### END Builder
2425

2526
### Use a second image for the final asset to reduce the number and
2627
# size of the layers.
27-
FROM ubuntu:21.04
28+
FROM ubuntu:24.04
2829

2930
# Env variables
3031
ENV DEBIAN_FRONTEND=noninteractive \
31-
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.9:/code/SuperBuild/install/lib/python3.8/dist-packages:/code/SuperBuild/install/bin/opensfm" \
32+
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
3233
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
3334
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
3435

@@ -37,11 +38,7 @@ WORKDIR /code
3738
# Copy everything we built from the builder
3839
COPY --from=builder /code /code
3940

40-
# Copy the Python libraries installed via pip from the builder
41-
COPY --from=builder /usr/local /usr/local
42-
43-
# Use old-releases for 21.04
44-
RUN printf "deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse" > /etc/apt/sources.list
41+
ENV PATH="/code/venv/bin:$PATH"
4542

4643
# Install shared libraries that we depend on via APT, but *not*
4744
# the -dev packages to save space!
@@ -51,5 +48,6 @@ RUN bash configure.sh installruntimedepsonly \
5148
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
5249
&& bash run.sh --help \
5350
&& bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"
51+
5452
# Entry point
5553
ENTRYPOINT ["python3", "/code/run.py"]

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ You're in good shape!
130130

131131
See https://github.com/NVIDIA/nvidia-docker and https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker for information on docker/NVIDIA setup.
132132

133-
## Native Install (Ubuntu 21.04)
133+
## Native Install (Ubuntu 24.04)
134134

135-
You can run ODM natively on Ubuntu 21.04 (although we don't recommend it):
135+
You can run ODM natively on Ubuntu 24.04 (although we don't recommend it):
136136

137137
```bash
138138
git clone https://github.com/OpenDroneMap/ODM
@@ -144,6 +144,8 @@ You can then process datasets with `./run.sh /datasets/odm_data_aukerman`
144144

145145
## Native Install (MacOS)
146146

147+
> **Warning:** Installation on Mac is currently unmaintained, and may not work out-of-the-box. See this [issue](https://community.opendronemap.org/t/odm-install-on-a-mac-os-14-6-1/25007/3).
148+
147149
You can run ODM natively on Intel/ARM MacOS.
148150

149151
First install:

SuperBuild/CMakeLists.txt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,9 @@ if (WIN32)
9696

9797
# Use the GDAL version that comes with pip
9898
set(GDAL_ROOT "${PYTHON_HOME}/Lib/site-packages/osgeo")
99-
set(GDAL_LIBRARY "${GDAL_ROOT}/lib/gdal_i.lib")
99+
set(GDAL_LIBRARY "${GDAL_ROOT}/gdal.lib")
100100
set(GDAL_INCLUDE_DIR "${GDAL_ROOT}/include/gdal")
101101

102-
# Also download missing headers :/
103-
if (NOT EXISTS "${GDAL_INCLUDE_DIR}/ogrsf_frmts.h")
104-
file(DOWNLOAD "https://raw.githubusercontent.com/OSGeo/gdal/release/3.2/gdal/ogr/ogrsf_frmts/ogrsf_frmts.h" "${GDAL_INCLUDE_DIR}/ogrsf_frmts.h")
105-
endif()
106-
107102
message("Copying VCPKG DLLs...")
108103
file(GLOB COPY_DLLS "${VCPKG_ROOT}/installed/x64-windows/bin/*.dll")
109104
file(COPY ${COPY_DLLS} DESTINATION "${SB_INSTALL_DIR}/bin")
@@ -117,7 +112,8 @@ elseif(APPLE)
117112
set(PYTHON_HOME "${SB_ROOT_DIR}/../venv")
118113
set(PYTHON_EXE_PATH "${PYTHON_HOME}/bin/python")
119114
else()
120-
set(PYTHON_EXE_PATH "/usr/bin/python3")
115+
set(PYTHON_HOME "${SB_ROOT_DIR}/../venv")
116+
set(PYTHON_EXE_PATH "${PYTHON_HOME}/bin/python3")
121117
endif()
122118

123119
# Path to additional CMake modules
@@ -133,7 +129,7 @@ include(ExternalProject-Setup)
133129
# ---------------------------------------------------------------------------------------------
134130
# Open Source Computer Vision (OpenCV)
135131
#
136-
set(ODM_OpenCV_Version 2.4.11)
132+
set(ODM_OpenCV_Version 4.12.0)
137133
option(ODM_BUILD_OpenCV "Force to build OpenCV library" OFF)
138134

139135
SETUP_EXTERNAL_PROJECT(OpenCV ${ODM_OpenCV_Version} ${ODM_BUILD_OpenCV})
@@ -160,7 +156,7 @@ SETUP_EXTERNAL_PROJECT(Ceres ${ODM_Ceres_Version} ${ODM_BUILD_Ceres})
160156
# ---------------------------------------------------------------------------------------------
161157
# Hexer
162158
#
163-
SETUP_EXTERNAL_PROJECT(Hexer 1.4 ON)
159+
SETUP_EXTERNAL_PROJECT(Hexer 1.5 ON)
164160

165161
# ---------------------------------------------------------------------------------------------
166162
# Open Structure from Motion (OpenSfM)
@@ -269,9 +265,9 @@ externalproject_add(lastools
269265
)
270266

271267
externalproject_add(draco
272-
GIT_REPOSITORY https://github.com/OpenDroneMap/draco
273-
GIT_SHALLOW ON
274-
GIT_TAG 304
268+
GIT_REPOSITORY https://github.com/google/draco
269+
GIT_SHALLOW OFF
270+
GIT_TAG e801aebf9665f6dcf3b6b0a604055a300ff85aa4
275271
PREFIX ${SB_BINARY_DIR}/draco
276272
SOURCE_DIR ${SB_SOURCE_DIR}/draco
277273
CMAKE_ARGS -DDRACO_TRANSCODER_SUPPORTED=ON

SuperBuild/cmake/External-Ceres.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ExternalProject_Add(${_proj_name}
1111
URL http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
1212
#--Update/Patch step----------
1313
UPDATE_COMMAND ""
14+
PATCH_COMMAND git apply ${CMAKE_MODULE_PATH}/ceres.patch
1415
#--Configure step-------------
1516
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
1617
CMAKE_ARGS

SuperBuild/cmake/External-Entwine.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ExternalProject_Add(${_proj_name}
1313
#--Download step--------------
1414
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
1515
GIT_REPOSITORY https://github.com/OpenDroneMap/entwine/
16-
GIT_TAG 290
16+
GIT_TAG 0cf957432f291e841ff1385085dadad933dcba8d
1717
#--Update/Patch step----------
1818
UPDATE_COMMAND ""
1919
#--Configure step-------------
@@ -23,6 +23,8 @@ ExternalProject_Add(${_proj_name}
2323
-DADDITIONAL_LINK_DIRECTORIES_PATHS=${SB_INSTALL_DIR}/lib
2424
-DWITH_TESTS=OFF
2525
-DWITH_ZSTD=OFF
26+
-DWITH_CURL=OFF
27+
-DWITH_OPENSSL=OFF
2628
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
2729
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
2830
#--Build step-----------------

0 commit comments

Comments
 (0)