Skip to content

Commit 6008062

Browse files
Add note on why we're using Docker
1 parent 74e36e1 commit 6008062

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# Running districtr-process
1+
# Running districtr-process (with Docker)
2+
## Why Docker?
3+
Docker is a tool to standardize and automate the setup of a virtual enviroment.
4+
It allows every developer to test and work with the same enviroment, regardless of operating system, as long as they have Docker installed.
5+
The districtr-process scripts only work on older versions of Python and require building custom libraries with `make`, which can be finnicky.
6+
Using Docker allows us to skip the normal convoluted setup process and simply fetch a pre-built virtual enviroment to work in.
7+
28
## Installing Docker
39
First, install Docker.
410
On macOS, you can install Docker like so:
@@ -20,17 +26,17 @@ docker pull innovativeinventor/districtr-process:latest
2026
Alternatively, you can build the dockerfile in `docker/Dockerfile` yourself.
2127

2228
## Running
23-
Finally, to run `districtr-process`, you can either run:
29+
Finally, to run `districtr-process`, you can run in the root of this git repo:
2430
```bash
2531
bash docker/run.sh [args]
2632
```
2733
where `[args]` are whatever arguments you pass to districtr_process (e.g. `python -m districtr_process data/minnesota.yml` becomes `bash docker/run.sh data/data/minnesota.yml`).
2834

29-
Alternatively, you can run:
35+
This is equivalent to running:
3036
```
3137
docker run -it --rm -v $(pwd):/districtr-process innovativeinventor/districtr-process python3 -m districtr_process [args]
3238
```
33-
where `$(pwd)` is the path to your `districtr-process` repo.
39+
where `$(pwd)` is the path to your `districtr-process` repo.
3440

3541
If you want to pass a mapbox API token to the Docker container, simply add it to `.env.list` file. For example, the contents of `.env.list` would look like:
3642
```

0 commit comments

Comments
 (0)