Bootstrap new projects with a template#

When using Raster Vision on a new project, the best practice is to create a new repo with its own Docker image based on the Raster Vision image. This involves a fair amount of boilerplate code which has a few things that vary between projects. To facilitate bootstrapping new projects, there is a cookiecutter template. Assuming that you cloned the Raster Vision repo and ran pip install cookiecutter, you can instantiate the template as follows (after adjusting paths appropriately for your particular setup).

[lfishgold@monoshone ~/projects]
$ cookiecutter raster-vision/cookiecutter_template/
caps_project_name [MY_PROJECT]:
project_name [my_project]:
docker_image [my_project]:
parent_docker_image []:
version [0.30]:
description [A Raster Vision plugin]:
url []:
author [Azavea]:
author_email []:

[lfishgold@monoshone ~/projects]
$ tree my_project/
├── Dockerfile
├── docker
│   ├── build
│   ├── ecr_publish
│   └── run
└── rastervision_my_project
    ├── rastervision
    │   └── my_project
    │       ├──
    │       ├── configs
    │       │   ├──
    │       │   └──
    │       ├──
    │       └──
    ├── requirements.txt

5 directories, 12 files

The output is a repo structure with the skeleton of a Raster Vision plugin that can be pip installed, and everything needed to build, run, and publish a Docker image with the plugin. The resulting file contains setup and usage information for running locally and on Batch, which makes use of the CloudFormation setup for creating new user/project-specific job defs.