Skip to content

Commit

Permalink
Merge pull request #179 from mhupfauer/master
Browse files Browse the repository at this point in the history
Update Dockerfile.gpu and provide docker-compose.yml examples
  • Loading branch information
pierotofy authored Feb 18, 2022
2 parents b076c6f + cd932e1 commit 6acd372
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions contrib/README.md
Original file line number Diff line number Diff line change
@@ -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`
22 changes: 22 additions & 0 deletions contrib/config-default.json
Original file line number Diff line number Diff line change
@@ -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": ""
}
9 changes: 9 additions & 0 deletions contrib/docker-compose.cpu.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions contrib/docker-compose.gpu.yml
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 6acd372

Please sign in to comment.