Skip to content

Commit d1a7e57

Browse files
authored
Merge pull request #2 from WebODM/dev
Fixes, improvements, 6x build speed up, update repos
2 parents ec0fd84 + e28d900 commit d1a7e57

56 files changed

Lines changed: 458 additions & 1350 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-docker.yaml

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Publish Docker
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- v*
9+
workflow_dispatch:
10+
jobs:
11+
build-amd64:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 1440
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
with:
20+
config-inline: |
21+
[worker.oci]
22+
max-parallelism = 1
23+
- name: Login to DockerHub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_TOKEN }}
28+
- name: Docker meta
29+
id: docker_meta
30+
uses: crazy-max/ghaction-docker-meta@v1
31+
with:
32+
images: webodm/odm
33+
tag-semver: |
34+
{{version}}
35+
- name: Set Swap Space
36+
uses: pierotofy/set-swap-space@master
37+
with:
38+
swap-size-gb: 10
39+
- name: Build and push Docker image (AMD64)
40+
id: docker_build_amd64
41+
uses: docker/build-push-action@v6
42+
with:
43+
context: .
44+
file: ./portable.Dockerfile
45+
platforms: linux/amd64
46+
push: true
47+
no-cache: true
48+
tags: |
49+
webodm/odm:latest-amd64
50+
provenance: false
51+
build-arm64:
52+
runs-on: ubuntu-24.04-arm
53+
timeout-minutes: 1440
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v5
57+
- name: Set up Docker Buildx
58+
uses: docker/setup-buildx-action@v3
59+
with:
60+
config-inline: |
61+
[worker.oci]
62+
max-parallelism = 1
63+
- name: Login to DockerHub
64+
uses: docker/login-action@v3
65+
with:
66+
username: ${{ secrets.DOCKERHUB_USERNAME }}
67+
password: ${{ secrets.DOCKERHUB_TOKEN }}
68+
- name: Set Swap Space
69+
uses: pierotofy/set-swap-space@master
70+
with:
71+
swap-size-gb: 10
72+
- name: Build and push Docker image (ARM64)
73+
id: docker_build_arm64
74+
uses: docker/build-push-action@v6
75+
with:
76+
context: .
77+
file: ./portable.Dockerfile
78+
platforms: linux/arm64
79+
push: true
80+
no-cache: true
81+
tags: |
82+
webodm/odm:latest-arm64
83+
provenance: false
84+
85+
create-manifest:
86+
runs-on: ubuntu-latest
87+
needs: [build-amd64, build-arm64]
88+
steps:
89+
- name: Login to DockerHub
90+
uses: docker/login-action@v3
91+
with:
92+
username: ${{ secrets.DOCKERHUB_USERNAME }}
93+
password: ${{ secrets.DOCKERHUB_TOKEN }}
94+
- name: Create and push multi-platform manifest
95+
run: |
96+
docker pull --platform linux/amd64 webodm/odm:latest-amd64
97+
docker pull --platform linux/arm64 webodm/odm:latest-arm64
98+
docker manifest create webodm/odm:latest \
99+
webodm/odm:latest-amd64 \
100+
webodm/odm:latest-arm64
101+
docker manifest push webodm/odm:latest
102+
103+
# Trigger NodeODM build, OATS test
104+
- name: Dispatch Build Event
105+
id: build_dispatch
106+
run: |
107+
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/WebODM/NodeODM/actions/workflows/publish-docker.yml/dispatches --data '{"ref": "master"}'
108+
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/WebODM/oats/actions/workflows/test.yaml/dispatches --data '{"ref": "master"}'

.github/workflows/publish-windows.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ permissions:
1414
jobs:
1515
build:
1616
runs-on: windows-2022
17-
environment: azuresigning
1817
steps:
1918
- name: Checkout
2019
uses: actions/checkout@v2
@@ -42,21 +41,9 @@ jobs:
4241
rmdir SuperBuild\download /s /q
4342
rmdir SuperBuild\build /s /q
4443
shell: cmd
45-
- name: Retrieve the metadata and decode it to a file
46-
env:
47-
AZURESIGNING_METADATA: ${{ secrets.AZURESIGNING_METADATA }}
48-
run: |
49-
echo $AZURESIGNING_METADATA | base64 --decode > "$RUNNER_TEMP\metadata.json"
50-
shell: bash
51-
- name: Azure login
52-
uses: azure/login@v1
53-
with:
54-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
55-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
56-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
5744
- name: Create setup
5845
run: |
59-
python configure.py dist --signtool-path "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe" --azure-signing-metadata "%RUNNER_TEMP%\metadata.json"
46+
python configure.py dist
6047
shell: cmd
6148
- name: Upload Setup File
6249
uses: actions/upload-artifact@v4
Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,26 @@ jobs:
2424
platforms: linux/amd64
2525
push: false
2626

27-
# snapcraft:
28-
# runs-on: ubuntu-latest
29-
# strategy:
30-
# matrix:
31-
# architecture:
32-
# - amd64
33-
# steps:
34-
# - name: Checkout
35-
# uses: actions/checkout@v2
36-
# - name: Set Swap Space
37-
# uses: pierotofy/set-swap-space@master
38-
# with:
39-
# swap-size-gb: 12
40-
# - name: Build
41-
# id: build
42-
# uses: diddlesnaps/snapcraft-multiarch-action@v1
43-
# with:
44-
# architecture: ${{ matrix.architecture }}
45-
# - name: Review
46-
# uses: diddlesnaps/snapcraft-review-tools-action@v1
47-
# with:
48-
# snap: ${{ steps.build.outputs.snap }}
49-
# isClassic: 'false'
50-
27+
docker_gpu:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
- name: Set Swap Space
33+
uses: pierotofy/set-swap-space@master
34+
with:
35+
swap-size-gb: 12
36+
- name: Set up QEMU
37+
uses: docker/setup-qemu-action@v1
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v1
40+
- name: Build
41+
uses: docker/build-push-action@v2
42+
with:
43+
file: ./gpu.Dockerfile
44+
platforms: linux/amd64
45+
push: false
46+
5147
windows:
5248
runs-on: windows-2022
5349
steps:

Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:24.04 AS builder
22

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

88
# Prepare directories
@@ -14,10 +14,6 @@ COPY . ./
1414
# Run the build
1515
RUN bash configure.sh install
1616

17-
# Run the tests
18-
ENV PATH="/code/venv/bin:$PATH"
19-
RUN bash test.sh
20-
2117
# Clean Superbuild
2218
RUN bash configure.sh clean
2319

@@ -29,7 +25,7 @@ FROM ubuntu:24.04
2925

3026
# Env variables
3127
ENV DEBIAN_FRONTEND=noninteractive \
32-
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/local/lib/python3.12/dist-packages:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
28+
PYTHONPATH="/code/SuperBuild/install/lib/python3.12:/code/SuperBuild/install/bin/opensfm" \
3329
LD_LIBRARY_PATH="/code/SuperBuild/install/lib" \
3430
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
3531

@@ -38,12 +34,13 @@ WORKDIR /code
3834
# Copy everything we built from the builder
3935
COPY --from=builder /code /code
4036

41-
ENV PATH="/code/venv/bin:$PATH"
37+
# Copy the Python libraries installed via pip from the builder
38+
COPY --from=builder /usr/local /usr/local
4239

4340
# Install shared libraries that we depend on via APT, but *not*
4441
# the -dev packages to save space!
4542
# Also run a smoke test on ODM and OpenSfM
46-
RUN bash configure.sh installruntimedepsonly \
43+
RUN bash configure.sh installruntimedeps \
4744
&& apt-get clean \
4845
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
4946
&& bash run.sh --help \

0 commit comments

Comments
 (0)