kopia lustrzana https://github.com/OpenDroneMap/ODM
GitHub GPU workflow, use SIFT_GPU when GPUs are available
rodzic
cf259688fe
commit
5e3737a3f5
|
@ -0,0 +1,32 @@
|
||||||
|
name: Publish Docker GPU Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and push Docker image
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
file: ./gpu.Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: opendronemap/odm:gpu
|
|
@ -120,6 +120,9 @@ install() {
|
||||||
|
|
||||||
|
|
||||||
pip install --ignore-installed -r requirements.txt
|
pip install --ignore-installed -r requirements.txt
|
||||||
|
if [ ! -z "$GPU_INSTALL" ]; then
|
||||||
|
pip install --ignore-installed -r requirements.gpu.txt
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -z "$PORTABLE_INSTALL" ]; then
|
if [ ! -z "$PORTABLE_INSTALL" ]; then
|
||||||
echo "Replacing g++ and gcc with our scripts for portability..."
|
echo "Replacing g++ and gcc with our scripts for portability..."
|
||||||
|
|
|
@ -12,7 +12,7 @@ WORKDIR /code
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
# Run the build
|
# Run the build
|
||||||
RUN bash configure.sh install
|
RUN PORTABLE_INSTALL=YES GPU_INSTALL=YES bash configure.sh install
|
||||||
|
|
||||||
# Clean Superbuild
|
# Clean Superbuild
|
||||||
RUN bash configure.sh clean
|
RUN bash configure.sh clean
|
||||||
|
|
|
@ -3,7 +3,11 @@ from repoze.lru import lru_cache
|
||||||
|
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
def has_gpus():
|
def has_gpus():
|
||||||
|
try:
|
||||||
import pyopencl
|
import pyopencl
|
||||||
|
except:
|
||||||
|
log.ODM_INFO("PyOpenCL is missing (not a GPU build)")
|
||||||
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
platforms = pyopencl.get_platforms()
|
platforms = pyopencl.get_platforms()
|
||||||
|
|
|
@ -217,11 +217,9 @@ class OSFMContext:
|
||||||
# GPU acceleration?
|
# GPU acceleration?
|
||||||
if has_gpus() and feature_type == "SIFT":
|
if has_gpus() and feature_type == "SIFT":
|
||||||
log.ODM_INFO("Using GPU for extracting SIFT features")
|
log.ODM_INFO("Using GPU for extracting SIFT features")
|
||||||
|
log.ODM_INFO("--min-num-features will be ignored")
|
||||||
feature_type = "SIFT_GPU"
|
feature_type = "SIFT_GPU"
|
||||||
|
|
||||||
# TODO: REMOVE
|
|
||||||
config.append("matcher_type: SIFT_GPU")
|
|
||||||
|
|
||||||
config.append("feature_type: %s" % feature_type)
|
config.append("feature_type: %s" % feature_type)
|
||||||
|
|
||||||
if has_alt:
|
if has_alt:
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
silx>=0.12.0
|
||||||
|
pyopencl==2021.1.1
|
|
@ -27,5 +27,3 @@ scikit-image==0.17.2
|
||||||
scipy==1.5.4
|
scipy==1.5.4
|
||||||
xmltodict==0.12.0
|
xmltodict==0.12.0
|
||||||
fpdf2==2.2.0rc2
|
fpdf2==2.2.0rc2
|
||||||
silx>=0.12.0
|
|
||||||
pyopencl==2021.1.1
|
|
Ładowanie…
Reference in New Issue