GitHub GPU workflow, use SIFT_GPU when GPUs are available

pull/1239/head
Piero Toffanin 2021-03-05 10:44:08 -05:00
rodzic cf259688fe
commit 5e3737a3f5
7 zmienionych plików z 44 dodań i 7 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -120,6 +120,9 @@ install() {
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
echo "Replacing g++ and gcc with our scripts for portability..."

Wyświetl plik

@ -12,7 +12,7 @@ WORKDIR /code
COPY . ./
# Run the build
RUN bash configure.sh install
RUN PORTABLE_INSTALL=YES GPU_INSTALL=YES bash configure.sh install
# Clean Superbuild
RUN bash configure.sh clean

Wyświetl plik

@ -3,7 +3,11 @@ from repoze.lru import lru_cache
@lru_cache(maxsize=None)
def has_gpus():
import pyopencl
try:
import pyopencl
except:
log.ODM_INFO("PyOpenCL is missing (not a GPU build)")
return False
try:
platforms = pyopencl.get_platforms()

Wyświetl plik

@ -217,10 +217,8 @@ class OSFMContext:
# GPU acceleration?
if has_gpus() and feature_type == "SIFT":
log.ODM_INFO("Using GPU for extracting SIFT features")
log.ODM_INFO("--min-num-features will be ignored")
feature_type = "SIFT_GPU"
# TODO: REMOVE
config.append("matcher_type: SIFT_GPU")
config.append("feature_type: %s" % feature_type)

Wyświetl plik

@ -0,0 +1,2 @@
silx>=0.12.0
pyopencl==2021.1.1

Wyświetl plik

@ -27,5 +27,3 @@ scikit-image==0.17.2
scipy==1.5.4
xmltodict==0.12.0
fpdf2==2.2.0rc2
silx>=0.12.0
pyopencl==2021.1.1