Merge pull request #179 from mhupfauer/master

Update Dockerfile.gpu and provide docker-compose.yml examples
pull/184/head
Piero Toffanin 2022-02-17 22:19:56 -05:00 zatwierdzone przez GitHub
commit 6acd3726f6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 61 dodań i 2 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ EXPOSE 3000
USER root
RUN apt-get update && apt-get install -y curl gpg-agent ca-certificates
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 && \
@ -18,7 +18,7 @@ WORKDIR "/var/www"
RUN useradd -m -d "/home/odm" -s /bin/bash odm
COPY --chown=odm:odm . /var/www
RUN npm install && mkdir -p tmp
RUN npm install --production && mkdir -p tmp
RUN chown -R odm:odm /var/www
RUN chown -R odm:odm /code

12
contrib/README.md 100644
Wyświetl plik

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

Wyświetl plik

@ -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": ""
}

Wyświetl plik

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

Wyświetl plik

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