Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/publish-docker-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Compute build metadata
id: buildmeta
run: |
echo "date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -31,6 +36,10 @@ jobs:
platforms: linux/amd64
push: true
no-cache: true
build-args: |
GIT_COMMIT=${{ github.sha }}

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.

sha is probably enough, but for convenience, can we also add "tags"/ commit title?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The tag is already attached to the images, just by a different method. A published image will end up as something like OpenDroneMap/ODM:3.6.1. These tags are extra values so we have an unmovable reference to what sha was actually built in that. Looking closer at the OCI labels, we might want a few more of them but I don't see which one would obviously suite a commit title - https://specs.opencontainers.org/image-spec/annotations/. Could always do a custom label but I think we might be able to have everything all link together with the sha and url alone.

BUILD_DATE=${{ steps.buildmeta.outputs.date }}
IMAGE_VERSION=${{ steps.buildmeta.outputs.version }}
tags: opendronemap/odm:gpu
# Trigger NodeODM build
- name: Dispatch NodeODM Build Event
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
images: opendronemap/odm
tag-semver: |
{{version}}
- name: Compute build metadata
id: buildmeta
run: |
echo "date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -43,6 +48,10 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
build-args: |
GIT_COMMIT=${{ github.sha }}
BUILD_DATE=${{ steps.buildmeta.outputs.date }}
IMAGE_VERSION=${{ steps.buildmeta.outputs.version }}
tags: |
${{ steps.docker_meta.outputs.tags }}
opendronemap/odm:latest
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ RUN bash configure.sh clean
# size of the layers.
FROM ubuntu:24.04

ARG GIT_COMMIT=unknown
ARG BUILD_DATE=unknown
ARG IMAGE_VERSION=unknown
LABEL org.opencontainers.image.revision="$GIT_COMMIT" \
org.opencontainers.image.source="https://github.com/OpenDroneMap/ODM" \
org.opencontainers.image.version="$IMAGE_VERSION" \
org.opencontainers.image.created="$BUILD_DATE"

# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/local/lib/python3.12/dist-packages:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
Expand Down
8 changes: 8 additions & 0 deletions gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ RUN bash configure.sh clean
# size of the layers.
FROM nvidia/cuda:12.9.1-runtime-ubuntu24.04

ARG GIT_COMMIT=unknown
ARG BUILD_DATE=unknown
ARG IMAGE_VERSION=unknown
LABEL org.opencontainers.image.revision="$GIT_COMMIT" \
org.opencontainers.image.source="https://github.com/OpenDroneMap/ODM" \
org.opencontainers.image.version="$IMAGE_VERSION" \
org.opencontainers.image.created="$BUILD_DATE"

# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/local/lib/python3.12/dist-packages:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
Expand Down
8 changes: 8 additions & 0 deletions portable.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ RUN bash configure.sh clean
# size of the layers.
FROM ubuntu:24.04

ARG GIT_COMMIT=unknown
ARG BUILD_DATE=unknown
ARG IMAGE_VERSION=unknown
LABEL org.opencontainers.image.revision="$GIT_COMMIT" \
org.opencontainers.image.source="https://github.com/OpenDroneMap/ODM" \
org.opencontainers.image.version="$IMAGE_VERSION" \
org.opencontainers.image.created="$BUILD_DATE"

# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/local/lib/python3.12/dist-packages:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
Expand Down
Loading