Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@ ADD . /webodm/
RUN git submodule init
RUN git submodule update

# Install Node.js + other packages
# Install Node.js
RUN curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs binutils libproj-dev gdal-bin
RUN apt-get install -y nodejs

# Configure use of testing branch of Debian
RUN printf "Package: *\nPin: release a=stable\nPin-Priority: 900\n" > /etc/apt/preferences.d/stable.pref
RUN printf "Package: *\nPin: release a=testing\nPin-Priority: 750\n" > /etc/apt/preferences.d/testing.pref
RUN printf "deb http://mirror.steadfast.net/debian/ stable main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ stable main contrib non-free" > /etc/apt/sources.list.d/stable.list
RUN printf "deb http://mirror.steadfast.net/debian/ testing main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ testing main contrib non-free" > /etc/apt/sources.list.d/testing.list

# Install GDAL
RUN apt-get update && apt-get install -t testing -y binutils libproj-dev gdal-bin

WORKDIR /webodm/nodeodm/external/node-OpenDroneMap
RUN npm install
Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,38 @@ If you know Python, web technologies (JS, HTML, CSS, etc.) or both, make a fork,
- [Python](https://www.python.org/downloads/)
- [Git](https://git-scm.com/downloads)

* From the Docker Quickstart Terminal (Windows) or from the command line (OSX / Linux) type:
* From the Docker Quickstart Terminal (Windows) or from the command line (Mac / Linux) type:
```
git clone https://github.com/OpenDroneMap/WebODM
cd WebODM
pip install docker-compose
docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml up
./webodm.sh start
```

* If you're on Windows / OSX, find the IP of your Docker machine by running this command from your Docker Quickstart Terminal:
* If you're on Windows find the IP of your Docker machine by running this command from your Docker Quickstart Terminal:

```
docker-machine ip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using Docker for {Mac, Windows}, it'll be your own IP address.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So Linux / Mac uses its own IP address, Windows needs to figure it out via docker-machine ip. Was this more a suggestion to change "Linux / Mac" with "{Linux, Mac}"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just that depending on the Docker setup people are using the IP will vary (as will the mechanism for doing so). Docker for __ transparently proxies ports; docker-machine does not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mm, I guess I'm a little confused, perhaps you can make a PR to change the README?

```

Linux users can connect to 127.0.0.1.
Linux / Mac, users can connect to 127.0.0.1.

* Open a Web Browser to `http://<yourDockerMachineIp>:8000`
* Log in with the default credentials: "admin:admin"

We recommend that you read the [Docker Documentation](https://docs.docker.com/) to familiarize with the application lifecycle, setup and teardown.
To stop WebODM press CTRL+C or run:

```
./webodm.sh stop
```

To update WebODM to the latest version use:

```
./webodm.sh update
```

We recommend that you read the [Docker Documentation](https://docs.docker.com/) to familiarize with the application lifecycle, setup and teardown, or for more advanced uses. Look at the contents of the webodm.sh script to understand what commands are used to launch WebODM.

If you are getting a **MemoryError** while processing the images, make sure that your Docker environment has enough RAM allocated. http://stackoverflow.com/a/39720010

Expand All @@ -50,6 +62,7 @@ If you want to run WebODM natively, you will need to install:
* PostgreSQL (>= 9.5)
* PostGIS 2.3
* Python 3.5
* GDAL (>= 2.1)

On Linux, make sure you have:

Expand All @@ -69,7 +82,7 @@ Then these steps should be sufficient to get you up and running:
git clone https://github.com/OpenDroneMap/WebODM
```

Create a `WebODM\webodm\local_settings.py` file containing:
Create a `WebODM\webodm\local_settings.py` file containing your database settings:

```
DATABASES = {
Expand All @@ -84,6 +97,13 @@ DATABASES = {
}
```

From psql or [pgadmin](https://www.pgadmin.org), connect to the database and set the [postgis.enable_outdb_rasters](http://postgis.net/docs/manual-2.2/postgis_enable_outdb_rasters.html) and [postgis.gdal_enabled_drivers](http://postgis.net/docs/postgis_gdal_enabled_drivers.html) settings:

```sql
ALTER SYSTEM SET postgis.enable_outdb_rasters TO True;
ALTER SYSTEM SET postgis.gdal_enabled_drivers TO 'GTiff';
```

Then:

```
Expand Down
2 changes: 1 addition & 1 deletion app/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ def boot():
scheduler.update_nodes_info(background=True)

except ProgrammingError:
logger.warn("Could not touch the database. If running a migration, this is expected.")
logger.warning("Could not touch the database. If running a migration, this is expected.")
1 change: 0 additions & 1 deletion app/migrations/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
*.py
106 changes: 106 additions & 0 deletions app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-12-12 15:35
from __future__ import unicode_literals

import app.models
import app.postgis
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

initial = True

dependencies = [
('nodeodm', '0001_initial'),
('auth', '0008_alter_user_username_max_length'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='ImageUpload',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image', models.ImageField(help_text='File uploaded by a user', upload_to=app.models.image_directory_path)),
],
),
migrations.CreateModel(
name='Project',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='A label used to describe the project', max_length=255)),
('description', models.TextField(blank=True, help_text='More in-depth description of the project', null=True)),
('created_at', models.DateTimeField(default=django.utils.timezone.now, help_text='Creation date')),
('deleting', models.BooleanField(db_index=True, default=False, help_text='Whether this project has been marked for deletion. Projects that have running tasks need to wait for tasks to be properly cleaned up before they can be deleted.')),
('owner', models.ForeignKey(help_text='The person who created the project', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
options={
'permissions': (('view_project', 'Can view project'),),
},
),
migrations.CreateModel(
name='ProjectGroupObjectPermission',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content_object', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Project')),
('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Group')),
('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Permission')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ProjectUserObjectPermission',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content_object', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Project')),
('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Permission')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Task',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.CharField(blank=True, db_index=True, default='', help_text="Identifier of the task (as returned by OpenDroneMap's REST API)", max_length=255)),
('name', models.CharField(blank=True, help_text='A label for the task', max_length=255, null=True)),
('processing_lock', models.BooleanField(default=False, help_text='A flag indicating whether this task is currently locked for processing. When this flag is turned on, the task is in the middle of a processing step.')),
('processing_time', models.IntegerField(default=-1, help_text='Number of milliseconds that elapsed since the beginning of this task (-1 indicates that no information is available)')),
('status', models.IntegerField(blank=True, choices=[(10, 'QUEUED'), (20, 'RUNNING'), (30, 'FAILED'), (40, 'COMPLETED'), (50, 'CANCELED')], db_index=True, help_text='Current status of the task', null=True)),
('last_error', models.TextField(blank=True, help_text='The last processing error received', null=True)),
('options', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={}, help_text='Options that are being used to process this task', validators=[app.models.validate_task_options])),
('console_output', models.TextField(blank=True, default='', help_text="Console output of the OpenDroneMap's process")),
('ground_control_points', models.FileField(blank=True, help_text='Optional Ground Control Points file to use for processing', null=True, upload_to=app.models.gcp_directory_path)),
('orthophoto', app.postgis.OffDbRasterField(blank=True, help_text='Orthophoto created by OpenDroneMap', null=True, srid=4326)),
('created_at', models.DateTimeField(default=django.utils.timezone.now, help_text='Creation date')),
('pending_action', models.IntegerField(blank=True, choices=[(1, 'CANCEL'), (2, 'REMOVE'), (3, 'RESTART')], db_index=True, help_text='A requested action to be performed on the task. The selected action will be performed by the scheduler at the next iteration.', null=True)),
('processing_node', models.ForeignKey(blank=True, help_text='Processing node assigned to this task (or null if this task has not been associated yet)', null=True, on_delete=django.db.models.deletion.CASCADE, to='nodeodm.ProcessingNode')),
('project', models.ForeignKey(help_text='Project that this task belongs to', on_delete=django.db.models.deletion.CASCADE, to='app.Project')),
],
options={
'permissions': (('view_task', 'Can view task'),),
},
),
migrations.AddField(
model_name='imageupload',
name='task',
field=models.ForeignKey(help_text='Task this image belongs to', on_delete=django.db.models.deletion.CASCADE, to='app.Task'),
),
migrations.AlterUniqueTogether(
name='projectuserobjectpermission',
unique_together=set([('user', 'permission', 'content_object')]),
),
migrations.AlterUniqueTogether(
name='projectgroupobjectpermission',
unique_together=set([('group', 'permission', 'content_object')]),
),
]
Loading