Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:14.04

# Install python
RUN \
apt-get update && \
apt-get install -y python python-dev python-pip python-virtualenv

# Install machine prerequirements
RUN apt-get install -y python-cairo python-gdal python-pip python-dev libpq-dev

# Set up and configure machine
ADD . /machine
WORKDIR /machine
RUN pip install -U .

# Default entrypoint
ENTRYPOINT ["openaddr-process-one"]
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ Run the complete batch process from the `openaddr` module:

python -m openaddr.process_all -a <AWS key> -s <AWS secret> -l <log> data.openaddresses.io

Using Docker
-----------

You can quickly set up a local machine in environment with docker, this is especially useful if you're looking to test changes to source conform files.

First, build the docker image like so:

docker build --rm -t openaddresses/machine .

You can now any of the process scripts, the default script is `openaddr-process`

Here's an example:

docker run -it --rm -v `pwd`/../openaddresses:/openaddresses -v `pwd`/../output:/output openaddresses/machine -l output.log /openaddresses/sources/us-ny-nyc.json /output

This will do the following:
* Mount `../openaddresses` on the host machine to `/openaddresses` in the docker container (this expects you to have the `openaddresses` repository cloned)
* Mount `../output` on the host machine to `/output` in the docker container (this allows you to have the processing output saved on the host machine)
* It will run the `openaddresses/machine` container that you just built
* The remaining arguments are sent directly to `openaddr-process-one`


Extras
------

Expand Down