kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Porównaj commity
97 Commity
Autor | SHA1 | Data |
---|---|---|
Piero Toffanin | 72202a93b5 | |
sean-kenops | 1b35d8b282 | |
Piero Toffanin | baa619a9fd | |
Piero Toffanin | 726e02ced5 | |
Alen | 2b5bfa048a | |
Piero Toffanin | 5cf8e65e56 | |
Stephen Mather | 16149f08bd | |
Stephen Mather | d7acd252a2 | |
Piero Toffanin | 5c1b4e38ae | |
Piero Toffanin | 7e24103991 | |
Piero Toffanin | 26d10d990c | |
Piero Toffanin | ecf6b8f099 | |
Piero Toffanin | 5e560fb635 | |
Piero Toffanin | 4c2868e228 | |
Richard Rowlands | c2c56e8500 | |
Piero Toffanin | eb2ea1bbab | |
Piero Toffanin | b9157e4b96 | |
Piero Toffanin | 5d4703a5b5 | |
Piero Toffanin | ca61927ef1 | |
Stephen Mather | d3ee44dfee | |
nghi01 | cb46646df3 | |
Stephen Mather | 2a7c73c8cd | |
Stephen Mather | c111b85f85 | |
Stephen Mather | 15ea35c5f9 | |
Piero Toffanin | 2230593804 | |
Stephen Mather | e8fb0dfe3e | |
Piero Toffanin | 512079b3c9 | |
Stephen Mather | 21c5697f97 | |
Stephen Mather | dd57c2c084 | |
Stephen Mather | 64189e747e | |
Stephen Mather | 0f5a1f56cc | |
Piero Toffanin | b8ce0b8ec7 | |
Piero Toffanin | c440dae0b2 | |
Piero Toffanin | f5b9866697 | |
nghi01 | 7e7c49f6a4 | |
nghi01 | 798303a20b | |
nghi01 | 78f05c3c24 | |
nghi01 | 3a4a957874 | |
Piero Toffanin | fc5c87e9c8 | |
Piero Toffanin | 5d6c1e787b | |
Piero Toffanin | dd38d81126 | |
Piero Toffanin | f213090a6a | |
Piero Toffanin | 6b4006abf7 | |
Piero Toffanin | 0d1910247b | |
Piero Toffanin | d9c5fb4b8c | |
Piero Toffanin | 8355086b30 | |
Timotej | 790fe97570 | |
Piero Toffanin | eb0a38fd44 | |
Piero Toffanin | 98e30377e3 | |
Piero Toffanin | 6676506c3f | |
Piero Toffanin | 1ba438e80f | |
Piero Toffanin | 0178c664ca | |
Piero Toffanin | 6acd3726f6 | |
mhupfauer | cd932e132a | |
mhupfauer | c0b0818f56 | |
mhupfauer | 8d85b8cbdd | |
mhupfauer | 788a7e9715 | |
mhupfauer | 1e67a15a76 | |
mhupfauer | d2be364842 | |
Piero Toffanin | b076c6f1b7 | |
Umang Kalra | 36782b415d | |
Piero Toffanin | dc32c0a232 | |
Piero Toffanin | 25544aa45b | |
Branton Davis | 733d89c88d | |
Piero Toffanin | c9aef9441e | |
Branton Davis | 1a1769d048 | |
Branton Davis | a14d8564b1 | |
Branton Davis | 3ce397c5b8 | |
Piero Toffanin | ce1d171dc1 | |
Branton Davis | f70f3aa7fa | |
Branton Davis | e1eb0e9729 | |
Piero Toffanin | fa4d346797 | |
Branton Davis | 2bac56345e | |
Piero Toffanin | 7d9d26a3d8 | |
Branton Davis | 1623651bda | |
Branton Davis | c4bb06001a | |
Branton Davis | 27d9ddfefb | |
Branton Davis | c00f1b7900 | |
Branton Davis | 7ff7a3e080 | |
Branton Davis | 14cd70ecee | |
Branton Davis | f3fcf9efab | |
Piero Toffanin | 23e0bc324f | |
Piero Toffanin | df28ecf5fd | |
Piero Toffanin | 2fb254e378 | |
Piero Toffanin | 8e7c64036e | |
Piero Toffanin | 63d07fe5cb | |
Piero Toffanin | 994d049074 | |
Piero Toffanin | d25c39c993 | |
Piero Toffanin | 173ea2be68 | |
Piero Toffanin | 9566ca72ec | |
Piero Toffanin | 1dcd2714e6 | |
Piero Toffanin | 16a458ef64 | |
Piero Toffanin | fe01adbc49 | |
Piero Toffanin | 0ddd8df673 | |
Piero Toffanin | 50c1daf9ef | |
Piero Toffanin | 56e345cc57 | |
Piero Toffanin | a296835dd5 |
|
@ -0,0 +1,44 @@
|
|||
name: Publish Docker Intel GPU
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Triggered by ODM build (after docker push)
|
||||
workflow_dispatch:
|
||||
|
||||
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 }}
|
||||
# Use the repository information of the checked-out code to format docker tags
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: opendronemap/nodeodm
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
- name: Build and push Docker image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: ./Dockerfile.gpu.intel
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
opendronemap/nodeodm:gpu.intel
|
|
@ -0,0 +1,44 @@
|
|||
name: Publish Docker GPU
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Triggered by ODM build (after docker push)
|
||||
workflow_dispatch:
|
||||
|
||||
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 }}
|
||||
# Use the repository information of the checked-out code to format docker tags
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: opendronemap/nodeodm
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
- name: Build and push Docker image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: ./Dockerfile.gpu
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
opendronemap/nodeodm:gpu
|
|
@ -0,0 +1,45 @@
|
|||
name: Publish Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Triggered by ODM build (after docker push)
|
||||
workflow_dispatch:
|
||||
|
||||
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 }}
|
||||
# Use the repository information of the checked-out code to format docker tags
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: opendronemap/nodeodm
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
- name: Build and push Docker image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ steps.docker_meta.outputs.tags }}
|
||||
opendronemap/nodeodm:latest
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: dist\*.zip
|
||||
file: dist/*.zip
|
||||
file_glob: true
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
|
|
@ -5,7 +5,7 @@ EXPOSE 3000
|
|||
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y curl gpg-agent
|
||||
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
|
||||
RUN curl --silent --location https://deb.nodesource.com/setup_14.x | bash -
|
||||
RUN apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \
|
||||
ln -s /code/SuperBuild/install/bin/untwine /usr/bin/untwine && \
|
||||
ln -s /code/SuperBuild/install/bin/entwine /usr/bin/entwine && \
|
||||
|
@ -17,6 +17,6 @@ RUN mkdir /var/www
|
|||
WORKDIR "/var/www"
|
||||
COPY . /var/www
|
||||
|
||||
RUN npm install && mkdir tmp
|
||||
RUN npm install --production && mkdir -p tmp
|
||||
|
||||
ENTRYPOINT ["/usr/bin/node", "/var/www/index.js"]
|
||||
|
|
|
@ -4,19 +4,26 @@ MAINTAINER Piero Toffanin <pt@masseranolabs.com>
|
|||
EXPOSE 3000
|
||||
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y curl gpg-agent
|
||||
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
|
||||
RUN apt-get update && apt-get install -y curl gpg-agent ca-certificates
|
||||
RUN curl --silent --location https://deb.nodesource.com/setup_14.x | bash -
|
||||
RUN apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \
|
||||
ln -s /code/SuperBuild/install/bin/untwine /usr/bin/untwine && \
|
||||
ln -s /code/SuperBuild/install/bin/entwine /usr/bin/entwine && \
|
||||
ln -s /code/SuperBuild/install/bin/pdal /usr/bin/pdal
|
||||
|
||||
RUN echo /usr/local/cuda-11.2/compat >> /etc/ld.so.conf.d/989_cuda-11.conf && ldconfig
|
||||
|
||||
RUN mkdir /var/www
|
||||
|
||||
WORKDIR "/var/www"
|
||||
COPY . /var/www
|
||||
RUN useradd -m -d "/home/odm" -s /bin/bash odm
|
||||
COPY --chown=odm:odm . /var/www
|
||||
|
||||
RUN npm install && mkdir tmp
|
||||
RUN npm install --production && mkdir -p tmp
|
||||
|
||||
RUN chown -R odm:odm /var/www
|
||||
RUN chown -R odm:odm /code
|
||||
|
||||
USER odm
|
||||
|
||||
ENTRYPOINT ["/usr/bin/node", "/var/www/index.js"]
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
FROM opendronemap/nodeodm:gpu
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get remove --purge -y intel-opencl-icd && \
|
||||
apt-get autoremove -y
|
||||
|
||||
RUN mkdir /tmp/opencl
|
||||
WORKDIR /tmp/opencl
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends ocl-icd-libopencl1 wget && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-gmmlib_21.2.1_amd64.deb && \
|
||||
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.8708/intel-igc-core_1.0.8708_amd64.deb && \
|
||||
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.8708/intel-igc-opencl_1.0.8708_amd64.deb && \
|
||||
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-opencl_21.38.21026_amd64.deb && \
|
||||
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-ocloc_21.38.21026_amd64.deb && \
|
||||
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-level-zero-gpu_1.2.21026_amd64.deb && \
|
||||
dpkg -i /tmp/opencl/*.deb && \
|
||||
ldconfig && \
|
||||
rm -Rf /tmp/opencl
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends clinfo
|
||||
|
||||
RUN usermod -aG video,users odm
|
||||
RUN usermod -aG video,users,odm root
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
ENTRYPOINT ["/var/www/run_gpu_intel.sh"]
|
71
README.md
71
README.md
|
@ -30,6 +30,69 @@ Linux users can connect to 127.0.0.1.
|
|||
|
||||
If the computer running NodeODM is using an old or 32bit CPU, you need to compile OpenDroneMap from sources and setup NodeODM natively. You cannot use docker. Docker images work with CPUs with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support or higher. Seeing a `Illegal instruction` error while processing images is an indication that your CPU is too old.
|
||||
|
||||
### Building docker image
|
||||
|
||||
If you need to test changes as a docker image, you can build easily as follows:
|
||||
|
||||
```
|
||||
docker build -t my_nodeodm_image --no-cache .
|
||||
```
|
||||
|
||||
Run as follows:
|
||||
|
||||
```
|
||||
docker run -p 3000:3000 my_nodeodm_image &
|
||||
```
|
||||
|
||||
|
||||
### Testing alternative ODM images through NodeODM
|
||||
|
||||
In order to test alternative ODM docker images in NodeODM, you will need to change the dockerfile for NodeODM to point to your ODM image. For example if you built an alternate ODM image as follows:
|
||||
|
||||
```
|
||||
docker build -t my_odm_image --no-cache .
|
||||
```
|
||||
|
||||
Then modify NodeODM's Dockerfile to point to the new ODM image in the first line:
|
||||
|
||||
```
|
||||
FROM my_odm_image
|
||||
MAINTAINER Piero Toffanin <pt@masseranolabs.com>
|
||||
|
||||
EXPOSE 3000
|
||||
...
|
||||
```
|
||||
|
||||
Then build the NodeODM image:
|
||||
|
||||
```
|
||||
docker build -t my_nodeodm_image --no-cache .
|
||||
```
|
||||
|
||||
Finally run as follows:
|
||||
|
||||
```
|
||||
docker run -p 3000:3000 my_nodeodm_image &
|
||||
```
|
||||
|
||||
### Running rootless
|
||||
|
||||
* A rootless alternative to Docker is using [Apptainer](https://apptainer.org/). In order to run NodeODM together with ClusterODM in rootless environments, for example on HPC, we need a rootless alternative to Docker, and that's where Apptainer comes in to play. From the Linux command line, cd into the NodeODM folder and run the following commands to host a NodeODM instance:
|
||||
|
||||
```
|
||||
apptainer build --sandbox node/ apptainer.def
|
||||
apptainer run --writable node/
|
||||
```
|
||||
|
||||
`apptainer build --sandbox` requires you to have root permission to build this apptainer container. Make sure someone with root permission build this for you. You will need to build this apptainer container if you want to work with ClusterODM on the HPC. Check for [ClusterODM](https://github.com/OpenDroneMap/ClusterODM) for more instructions on using SLURM to set it up.
|
||||
|
||||
An apptainer.def file can be built directly from the dockerfile as needed:
|
||||
|
||||
```
|
||||
pip3 install spython
|
||||
spython recipe Dockerfile &> apptainer.def
|
||||
```
|
||||
|
||||
## API Docs
|
||||
|
||||
See the [API documentation page](https://github.com/OpenDroneMap/NodeODM/blob/master/docs/index.adoc).
|
||||
|
@ -50,15 +113,15 @@ docker run -p 3000:3000 -v /mnt/external_hd:/var/www/data opendronemap/nodeodm
|
|||
|
||||
This can be also used to access the computation results directly from the file system.
|
||||
|
||||
## Using GPU Acceleration for SIFT processing inside NodeODM
|
||||
Since the ODM has support [of GPU acceleration](https://github.com/OpenDroneMap/ODM#gpu-acceleration) you can use another base image for GPU processing.
|
||||
## Using GPU Acceleration
|
||||
|
||||
Since ODM has support [for GPU acceleration](https://github.com/OpenDroneMap/ODM#gpu-acceleration) you can use another base image for GPU processing. You need to use the `opendronemap/nodeodm:gpu` docker image instead of `opendronemap/nodeodm` and you need to pass the `--gpus all` flag:
|
||||
|
||||
To use this feature, you need to use the `opendronemap/nodeodm:gpu` docker image instead of `opendronemap/nodeodm` and you need to pass the `--gpus all` flag:
|
||||
```bash
|
||||
docker run -p 3000:3000 --gpus all opendronemap/nodeodm:gpu
|
||||
```
|
||||
|
||||
The SIFT GPU implementation is OpenCL-based, so should work with most graphics card (not just NVIDIA).
|
||||
The GPU implementation is CUDA-based, so will only work on NVIDIA GPUs.
|
||||
|
||||
If you have an NVIDIA card, you can test that docker is recognizing the GPU by running:
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
Bootstrap: docker
|
||||
From: opendronemap/odm:latest
|
||||
Stage: spython-base
|
||||
|
||||
%files
|
||||
. /var/www
|
||||
%labels
|
||||
MAINTAINER Piero Toffanin <pt@masseranolabs.com>
|
||||
%post
|
||||
|
||||
# EXPOSE 3000
|
||||
|
||||
su - root # USER root
|
||||
apt-get update && apt-get install -y curl gpg-agent
|
||||
curl --silent --location https://deb.nodesource.com/setup_14.x | bash -
|
||||
apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \
|
||||
ln -s /code/SuperBuild/install/bin/untwine /usr/bin/untwine && \
|
||||
ln -s /code/SuperBuild/install/bin/entwine /usr/bin/entwine && \
|
||||
ln -s /code/SuperBuild/install/bin/pdal /usr/bin/pdal
|
||||
|
||||
|
||||
mkdir -p /var/www
|
||||
|
||||
mkdir -p "/var/www"
|
||||
cd "/var/www"
|
||||
|
||||
npm install --production && mkdir -p tmp
|
||||
|
||||
%runscript
|
||||
cd "/var/www"
|
||||
exec /usr/bin/node /var/www/index.js "$@"
|
||||
%startscript
|
||||
cd "/var/www"
|
||||
exec /usr/bin/node /var/www/index.js "$@"
|
|
@ -9,7 +9,7 @@
|
|||
"logDirectory": ""
|
||||
},
|
||||
|
||||
"port": 3000,
|
||||
"port": "auto",
|
||||
"deamon": false,
|
||||
"parallelQueueProcessing": 1,
|
||||
"cleanupTasksAfter": 2880,
|
||||
|
|
22
config.js
22
config.js
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
'use strict';
|
||||
|
@ -29,14 +29,14 @@ Usage: node index.js [options]
|
|||
|
||||
Options:
|
||||
--config <path> Path to the configuration file (default: config-default.json)
|
||||
-p, --port <number> Port to bind the server to (default: 3000)
|
||||
--odm_path <path> Path to OpenDroneMap's code (default: /code)
|
||||
-p, --port <number> Port to bind the server to, or "auto" to automatically find an available port (default: 3000)
|
||||
--odm_path <path> Path to ODM's code (default: /code)
|
||||
--log_level <logLevel> Set log level verbosity (default: info)
|
||||
-d, --daemon Set process to run as a deamon
|
||||
-q, --parallel_queue_processing <number> Number of simultaneous processing tasks (default: 2)
|
||||
--cleanup_tasks_after <number> Number of minutes that elapse before deleting finished and canceled tasks (default: 2880)
|
||||
--cleanup_uploads_after <number> Number of minutes that elapse before deleting unfinished uploads. Set this value to the maximum time you expect a dataset to be uploaded. (default: 2880)
|
||||
--test Enable test mode. In test mode, no commands are sent to OpenDroneMap. This can be useful during development or testing (default: false)
|
||||
--test Enable test mode. In test mode, no commands are sent to ODM. This can be useful during development or testing (default: false)
|
||||
--test_skip_orthophotos If test mode is enabled, skip orthophoto results when generating assets. (default: false)
|
||||
--test_skip_dems If test mode is enabled, skip dems results when generating assets. (default: false)
|
||||
--test_drop_uploads If test mode is enabled, drop /task/new/upload requests with 50% probability. (default: false)
|
||||
|
@ -52,8 +52,9 @@ Options:
|
|||
--s3_force_path_style Whether to force path style URLs for S3 objects. (default: false)
|
||||
--s3_secret_key <secret> S3 secret key, required if --s3_endpoint is set. (default: none)
|
||||
--s3_signature_version <version> S3 signature version. (default: 4)
|
||||
--s3_acl <canned-acl> S3 object acl. (default: public-read)
|
||||
--s3_acl <canned-acl> S3 object acl. Can specify "none" to skip. (default: public-read)
|
||||
--s3_upload_everything Upload all task results to S3. (default: upload only all.zip archive)
|
||||
--s3_ignore_ssl Whether to ignore SSL errors while connecting to S3. (default: false)
|
||||
--max_concurrency <number> Place a cap on the max-concurrency option to use for each task. (default: no limit)
|
||||
--max_runtime <number> Number of minutes (approximate) that a task is allowed to run before being forcibly canceled (timeout). (default: no limit)
|
||||
Log Levels:
|
||||
|
@ -68,7 +69,7 @@ const allOpts = ["slice","help","config","odm_path","log_level","port","p",
|
|||
"test_skip_dems","test_drop_uploads","test_fail_tasks","test_seconds",
|
||||
"powercycle","token","max_images","webhook","s3_endpoint","s3_bucket",
|
||||
"s3_force_path_style","s3_access_key","s3_secret_key","s3_signature_version",
|
||||
"s3_acl","s3_upload_everything","max_concurrency","max_runtime"];
|
||||
"s3_acl","s3_upload_everything","s3_ignore_ssl","max_concurrency","max_runtime"];
|
||||
|
||||
// Support for "-" or "_" style params syntax
|
||||
for (let k in argv){
|
||||
|
@ -114,7 +115,7 @@ config.logger.maxFileSize = fromConfigFile("logger.maxFileSize", 1024 * 1024 * 1
|
|||
config.logger.maxFiles = fromConfigFile("logger.maxFiles", 10); // Max number of log files kept
|
||||
config.logger.logDirectory = fromConfigFile("logger.logDirectory", ''); // Set this to a full path to a directory - if not set logs will be written to the application directory.
|
||||
|
||||
config.port = parseInt(argv.port || argv.p || fromConfigFile("port", process.env.PORT || 3000));
|
||||
config.port = (argv.port || argv.p || fromConfigFile("port", process.env.PORT || "auto"));
|
||||
config.deamon = argv.deamonize || argv.daemon || argv.d || fromConfigFile("daemon", false);
|
||||
config.parallelQueueProcessing = parseInt(argv.parallel_queue_processing || argv.q || fromConfigFile("parallelQueueProcessing", 1));
|
||||
config.cleanupTasksAfter = parseInt(argv.cleanup_tasks_after || fromConfigFile("cleanupTasksAfter", 2880));
|
||||
|
@ -138,6 +139,7 @@ config.s3SecretKey = argv.s3_secret_key || fromConfigFile("s3SecretKey", process
|
|||
config.s3SignatureVersion = argv.s3_signature_version || fromConfigFile("s3SignatureVersion", "4")
|
||||
config.s3ACL = argv.s3_acl || fromConfigFile("s3_acl", "public-read")
|
||||
config.s3UploadEverything = argv.s3_upload_everything || fromConfigFile("s3UploadEverything", false);
|
||||
config.s3IgnoreSSL = argv.s3_ignore_ssl || fromConfigFile("s3IgnoreSSL", false);
|
||||
config.maxConcurrency = parseInt(argv.max_concurrency || fromConfigFile("maxConcurrency", 0));
|
||||
config.maxRuntime = parseInt(argv.max_runtime || fromConfigFile("maxRuntime", -1));
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# Run NodeODM thorugh docker-compose
|
||||
To easily manage NodeODM with docker-compose take a look at these sample `docker-compose.yml` files
|
||||
|
||||
## Quickstart
|
||||
Edit the `config-default.json` to match your required settings. Make sure you change the value for `token` to secure
|
||||
your NodeODM instance if you plan on hosting the server publicly
|
||||
|
||||
## GPU acceleration
|
||||
To utilize the GPU acceleration of NVIDA graphics cards run: `docker-compose -f docker-compose.gpu.yml up -d`
|
||||
|
||||
## CPU only operation
|
||||
If there is no GPU acceleration available you can run NodeODM on CPU only with: `docker-compose -f docker-compose.cpu.yml up -d`
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"instance": "YOUR-INSTANCENAME",
|
||||
"odm_path": "/code",
|
||||
|
||||
"logger": {
|
||||
"level": "error",
|
||||
"maxFileSize": 104857600,
|
||||
"maxFiles": 10,
|
||||
"logDirectory": ""
|
||||
},
|
||||
|
||||
"port": "3000",
|
||||
"deamon": false,
|
||||
"parallelQueueProcessing": 1,
|
||||
"cleanupTasksAfter": 2880,
|
||||
"test": false,
|
||||
"testSkipOrthophotos": false,
|
||||
"testSkipDems": false,
|
||||
"token": "CHANGE-THIS-TOKEN-TO-YOUR-OWN-SECRET",
|
||||
"authorizedIps": [],
|
||||
"maxImages": ""
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
version: '3.8'
|
||||
services:
|
||||
node-odm:
|
||||
image: opendronemap/nodeodm
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./config-default.json:/var/www/config-default.json
|
||||
restart: unless-stopped
|
|
@ -0,0 +1,16 @@
|
|||
version: '3.8'
|
||||
services:
|
||||
node-odm:
|
||||
image: opendronemap/nodeodm:gpu
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./config-default.json:/var/www/config-default.json
|
||||
privileged: true
|
||||
restart: unless-stopped
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
capabilities: [gpu]
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -8,7 +8,7 @@ REST API to access ODM
|
|||
|
||||
=== Version information
|
||||
[%hardbreaks]
|
||||
_Version_ : 2.1.4
|
||||
_Version_ : 2.2.1
|
||||
|
||||
|
||||
=== Contact information
|
||||
|
@ -340,7 +340,7 @@ _optional_|Token required for authentication (when authentication is required).|
|
|||
|*FormData*|*dateCreated* +
|
||||
_optional_|An optional timestamp overriding the default creation date of the task.|integer|
|
||||
|*FormData*|*images* +
|
||||
_optional_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
|
||||
_optional_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
|
||||
|*FormData*|*name* +
|
||||
_optional_|An optional name to be associated with the task|string|
|
||||
|*FormData*|*options* +
|
||||
|
@ -503,7 +503,7 @@ _required_|UUID of the task|string|
|
|||
|*Query*|*token* +
|
||||
_optional_|Token required for authentication (when authentication is required).|string|
|
||||
|*FormData*|*images* +
|
||||
_required_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
|
||||
_required_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
|
||||
|===
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
'''
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -13,7 +13,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
'''
|
||||
|
||||
|
|
41
index.js
41
index.js
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
@ -142,7 +142,7 @@ app.post('/task/new/init', authCheck, taskNew.assignUUID, formDataParser, taskNe
|
|||
* -
|
||||
* name: images
|
||||
* in: formData
|
||||
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
|
||||
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
|
||||
* required: true
|
||||
* type: file
|
||||
* -
|
||||
|
@ -209,7 +209,7 @@ app.post('/task/new/commit/:uuid', authCheck, taskNew.getUUID, taskNew.handleCom
|
|||
* -
|
||||
* name: images
|
||||
* in: formData
|
||||
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
|
||||
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
|
||||
* required: false
|
||||
* type: file
|
||||
* -
|
||||
|
@ -918,10 +918,29 @@ let commands = [
|
|||
taskManager = TaskManager.singleton();
|
||||
},
|
||||
cb => {
|
||||
server = app.listen(config.port, err => {
|
||||
if (!err) logger.info('Server has started on port ' + String(config.port));
|
||||
cb(err);
|
||||
});
|
||||
const startServer = (port, cb) => {
|
||||
server = app.listen(parseInt(port), (err) => {
|
||||
if (!err) logger.info('Server has started on port ' + String(port));
|
||||
cb(err);
|
||||
});
|
||||
server.on("error", cb);
|
||||
};
|
||||
|
||||
const tryStartServer = (port, cb) => {
|
||||
startServer(port, (err) => {
|
||||
if (err && err.code === 'EADDRINUSE' && port < 5000){
|
||||
tryStartServer(port + 1, cb);
|
||||
}else cb(err);
|
||||
});
|
||||
};
|
||||
|
||||
if (Number.isInteger(parseInt(config.port))){
|
||||
startServer(config.port, cb);
|
||||
}else if (config.port === "auto"){
|
||||
tryStartServer(3000, cb);
|
||||
}else{
|
||||
cb(new Error(`Invalid port: ${config.port}`));
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -934,7 +953,7 @@ if (config.powercycle) {
|
|||
|
||||
async.series(commands, err => {
|
||||
if (err) {
|
||||
logger.error("Error during startup: " + err.message);
|
||||
logger.error(err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
@ -21,7 +21,7 @@ const dgram = require('dgram');
|
|||
|
||||
module.exports = class ProgressReceiver{
|
||||
constructor(){
|
||||
const server = dgram.createSocket('udp4');
|
||||
const server = dgram.createSocket({type: 'udp4', reuseAddr: true});
|
||||
this.callbacks = [];
|
||||
|
||||
server.on('error', (err) => {
|
||||
|
|
38
libs/S3.js
38
libs/S3.js
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
@ -23,6 +23,7 @@ const glob = require('glob');
|
|||
const path = require('path');
|
||||
const logger = require('./logger');
|
||||
const config = require('../config');
|
||||
const https = require('https');
|
||||
const si = require('systeminformation');
|
||||
|
||||
let s3 = null;
|
||||
|
@ -34,8 +35,18 @@ module.exports = {
|
|||
|
||||
initialize: function(cb){
|
||||
if (config.s3Endpoint && config.s3Bucket){
|
||||
if (config.s3IgnoreSSL){
|
||||
AWS.config.update({
|
||||
httpOptions: {
|
||||
agent: new https.Agent({
|
||||
rejectUnauthorized: false
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const spacesEndpoint = new AWS.Endpoint(config.s3Endpoint);
|
||||
|
||||
|
||||
const s3Config = {
|
||||
endpoint: spacesEndpoint,
|
||||
signatureVersion: ('v' + config.s3SignatureVersion) || 'v4',
|
||||
|
@ -62,7 +73,7 @@ module.exports = {
|
|||
logger.info("Connected to S3");
|
||||
cb();
|
||||
}else{
|
||||
cb(new Error("Cannot connect to S3. Check your S3 configuration: " + err.code));
|
||||
cb(new Error(`Cannot connect to S3. Check your S3 configuration: ${err.message} (${err.code})`));
|
||||
}
|
||||
});
|
||||
}else cb();
|
||||
|
@ -107,15 +118,20 @@ module.exports = {
|
|||
const filename = path.basename(file.dest);
|
||||
progress[filename] = 0;
|
||||
|
||||
s3.upload({
|
||||
let uploadCfg = {
|
||||
Bucket: bucket,
|
||||
Key: file.dest,
|
||||
Body: fs.createReadStream(file.src),
|
||||
ACL: config.s3ACL
|
||||
}, {partSize, queueSize: concurrency}, err => {
|
||||
Body: fs.createReadStream(file.src)
|
||||
}
|
||||
|
||||
if (config.s3ACL != "none") {
|
||||
uploadCfg.ACL = config.s3ACL;
|
||||
}
|
||||
|
||||
s3.upload(uploadCfg, {partSize, queueSize: concurrency}, err => {
|
||||
if (err){
|
||||
logger.debug(err);
|
||||
const msg = `Cannot upload file to S3: ${err.code}, retrying... ${file.retries}`;
|
||||
const msg = `Cannot upload file to S3: ${err.message} (${err.code}), retrying... ${file.retries}`;
|
||||
if (onOutput) onOutput(msg);
|
||||
if (file.retries < MAX_RETRIES){
|
||||
file.retries++;
|
||||
|
|
61
libs/Task.js
61
libs/Task.js
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
@ -50,6 +50,7 @@ module.exports = class Task{
|
|||
this.options = options;
|
||||
this.gcpFiles = [];
|
||||
this.geoFiles = [];
|
||||
this.alignFiles = [];
|
||||
this.imageGroupsFiles = [];
|
||||
this.output = [];
|
||||
this.runningProcesses = [];
|
||||
|
@ -88,11 +89,16 @@ module.exports = class Task{
|
|||
this.imageGroupsFiles.push(file);
|
||||
}else if (/\.txt$/gi.test(file)){
|
||||
this.gcpFiles.push(file);
|
||||
}else if (/^align\.(tif|laz|las)$/gi.test(file)){
|
||||
this.alignFiles.push(file);
|
||||
}
|
||||
logger.debug(file);
|
||||
});
|
||||
logger.debug(`Found ${this.gcpFiles.length} GCP files (${this.gcpFiles.join(" ")}) for ${this.uuid}`);
|
||||
logger.debug(`Found ${this.geoFiles.length} GEO files (${this.geoFiles.join(" ")}) for ${this.uuid}`);
|
||||
logger.debug(`Found ${this.imageGroupsFiles.length} image groups files (${this.imageGroupsFiles.join(" ")}) for ${this.uuid}`);
|
||||
logger.debug(`Found ${this.alignFiles.length} alignment files (${this.alignFiles.join(" ")}) for ${this.uuid}`);
|
||||
|
||||
cb(null);
|
||||
}
|
||||
});
|
||||
|
@ -112,44 +118,32 @@ module.exports = class Task{
|
|||
}
|
||||
|
||||
setPostProcessingOptsSteps(){
|
||||
return [
|
||||
cb => {
|
||||
// If we need to post process results
|
||||
// if pc-ept is supported (build entwine point cloud)
|
||||
// we automatically add the pc-ept option to the task options by default
|
||||
if (this.skipPostProcessing) cb();
|
||||
else{
|
||||
odmInfo.supportsOption("pc-ept", (err, supported) => {
|
||||
if (err){
|
||||
console.warn(`Cannot check for supported option pc-ept: ${err}`);
|
||||
}else if (supported){
|
||||
if (!this.options.find(opt => opt.name === "pc-ept")){
|
||||
this.options.push({ name: 'pc-ept', value: true });
|
||||
}
|
||||
}
|
||||
cb();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
cb => {
|
||||
const autoSet = (opt) => {
|
||||
return cb => {
|
||||
// If we need to post process results
|
||||
// if cog is supported (build cloud optimized geotiffs)
|
||||
// we automatically add the cog option to the task options by default
|
||||
// if opt is supported
|
||||
// we automatically add the opt to the task options by default
|
||||
if (this.skipPostProcessing) cb();
|
||||
else{
|
||||
odmInfo.supportsOption("cog", (err, supported) => {
|
||||
odmInfo.supportsOption(opt, (err, supported) => {
|
||||
if (err){
|
||||
console.warn(`Cannot check for supported option cog: ${err}`);
|
||||
console.warn(`Cannot check for supported option ${opt}: ${err}`);
|
||||
}else if (supported){
|
||||
if (!this.options.find(opt => opt.name === "cog")){
|
||||
this.options.push({ name: 'cog', value: true });
|
||||
if (!this.options.find(o => o.name === opt)){
|
||||
this.options.push({ name: opt, value: true });
|
||||
}
|
||||
}
|
||||
cb();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return [
|
||||
autoSet("pc-ept"),
|
||||
autoSet("cog"),
|
||||
autoSet("gltf")
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -450,9 +444,13 @@ module.exports = class Task{
|
|||
let allPaths = ['odm_orthophoto/odm_orthophoto.tif',
|
||||
'odm_orthophoto/odm_orthophoto.png',
|
||||
'odm_orthophoto/odm_orthophoto.mbtiles',
|
||||
'odm_orthophoto/odm_orthophoto.kmz',
|
||||
'odm_orthophoto/cutline.gpkg',
|
||||
'odm_georeferencing', 'odm_texturing',
|
||||
'odm_dem/dsm.tif', 'odm_dem/dtm.tif', 'dsm_tiles', 'dtm_tiles',
|
||||
'odm_dem/dsm.euclideand.tif', 'odm_dem/dtm.euclideand.tif',
|
||||
'orthophoto_tiles', 'potree_pointcloud', 'entwine_pointcloud',
|
||||
'3d_tiles',
|
||||
'images.json', 'cameras.json',
|
||||
'task_output.txt', 'log.json',
|
||||
'odm_report'];
|
||||
|
@ -556,6 +554,9 @@ module.exports = class Task{
|
|||
if (this.geoFiles.length > 0){
|
||||
runnerOptions.geo = fs.realpathSync(path.join(this.getGcpFolderPath(), this.geoFiles[0]));
|
||||
}
|
||||
if (this.alignFiles.length > 0){
|
||||
runnerOptions.align = fs.realpathSync(path.join(this.getGcpFolderPath(), this.alignFiles[0]));
|
||||
}
|
||||
if (this.imageGroupsFiles.length > 0){
|
||||
runnerOptions["split-image-groups"] = fs.realpathSync(path.join(this.getGcpFolderPath(), this.imageGroupsFiles[0]));
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const fs = require('fs');
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2018 Node-OpenDroneMap Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const TokenAuthBase = require('./TokenAuthBase');
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2018 Node-OpenDroneMap Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const TokenAuthBase = require('./TokenAuthBase');
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2018 Node-OpenDroneMap Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
let logger = require('../logger');
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2018 Node-OpenDroneMap Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const TokenAuthBase = require("./TokenAuthBase");
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
@ -82,7 +82,7 @@ module.exports = {
|
|||
// (num cores can be set programmatically, so can gcpFile, etc.)
|
||||
if (["-h", "--project-path", "--cmvs-maxImages", "--time",
|
||||
"--zip-results", "--pmvs-num-cores",
|
||||
"--start-with", "--gcp", "--images", "--geo",
|
||||
"--start-with", "--gcp", "--images", "--geo", "--align",
|
||||
"--split-image-groups", "--copy-to",
|
||||
"--rerun-all", "--rerun",
|
||||
"--slam-config", "--video", "--version", "name"].indexOf(option) !== -1) continue;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
"use strict";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
@ -31,6 +31,7 @@ const odmInfo = require('./odmInfo');
|
|||
const request = require('request');
|
||||
const ziputils = require('./ziputils');
|
||||
const statusCodes = require('./statusCodes');
|
||||
const logger = require('./logger');
|
||||
|
||||
const download = function(uri, filename, callback) {
|
||||
request.head(uri, function(err, res, body) {
|
||||
|
@ -143,7 +144,7 @@ module.exports = {
|
|||
if (req.files && req.files.length > 0){
|
||||
res.json({success: true});
|
||||
}else{
|
||||
res.json({error: "Need at least 1 file."});
|
||||
res.json({error: "Need at least 1 file.", noRetry: true});
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -303,8 +304,11 @@ module.exports = {
|
|||
else{
|
||||
if (++retries < 20){
|
||||
logger.warn(`Cannot move ${srcPath}, probably caused by antivirus software (please disable it or add an exception), retrying (${retries})...`);
|
||||
setTimeout(2000, move);
|
||||
}else cb(err);
|
||||
setTimeout(move, 2000);
|
||||
} else {
|
||||
logger.error(`Unable to move temp images (${srcPath}) after 20 retries. Error: ${err}`);
|
||||
cb(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -362,13 +366,13 @@ module.exports = {
|
|||
},
|
||||
|
||||
cb => {
|
||||
// Find any *.txt (GCP) file and move it to the data/<uuid>/gcp directory
|
||||
// Find any *.txt (GCP) file or alignment file and move it to the data/<uuid>/gcp directory
|
||||
// also remove any lingering zipurl.zip
|
||||
fs.readdir(destImagesPath, (err, entries) => {
|
||||
if (err) cb(err);
|
||||
else {
|
||||
async.eachSeries(entries, (entry, cb) => {
|
||||
if (/\.txt$/gi.test(entry)) {
|
||||
if (/\.txt$/gi.test(entry) || /^align\.(las|laz|tif)$/gi.test(entry)) {
|
||||
mv(path.join(destImagesPath, entry), path.join(destGcpPath, entry), cb);
|
||||
}else if (/\.zip$/gi.test(entry)){
|
||||
fs.unlink(path.join(destImagesPath, entry), cb);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "NodeODM",
|
||||
"version": "2.1.9",
|
||||
"version": "2.2.3",
|
||||
"description": "REST API to access ODM",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
Node-OpenDroneMap Node.js App and REST API to access OpenDroneMap.
|
||||
Copyright (C) 2016 Node-OpenDroneMap Contributors
|
||||
NodeODM App and REST API to access ODM.
|
||||
Copyright (C) 2016 NodeODM Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
$(function() {
|
||||
|
@ -119,7 +119,7 @@ $(function() {
|
|||
url : "/task/new/upload/",
|
||||
parallelUploads: 8, // http://blog.olamisan.com/max-parallel-http-connections-in-a-browser max parallel connections
|
||||
uploadMultiple: false,
|
||||
acceptedFiles: "image/*,text/*,application/*",
|
||||
acceptedFiles: "image/*,text/*,application/*,.las,.laz,video/*,.srt",
|
||||
autoProcessQueue: false,
|
||||
createImageThumbnails: false,
|
||||
previewTemplate: '<div style="display:none"></div>',
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z "${RENDER_GROUP_ID}" ]; then
|
||||
if [ "${RENDER_GROUP_ID}" -ne 0 ]; then
|
||||
groupadd -g "${RENDER_GROUP_ID}" render
|
||||
usermod -aG render odm
|
||||
fi
|
||||
fi
|
||||
|
||||
while IFS='=' read -r name value ; do
|
||||
echo "export ${name}=\"${value}\"" >> /home/odm/env
|
||||
done < <(env | grep -v "HOME")
|
||||
chown odm:odm /home/odm/env
|
||||
|
||||
su - odm -c "source /home/odm/env; cd /var/www; echo $WO_DEFAULT_NODES; /usr/bin/node /var/www/index.js $@"
|
File diff suppressed because one or more lines are too long
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue