Skip to content

Commit

Permalink
Merge 4470137 into d101c00
Browse files Browse the repository at this point in the history
  • Loading branch information
kuanb committed Jan 6, 2018
2 parents d101c00 + 4470137 commit 2600d9c
Show file tree
Hide file tree
Showing 7 changed files with 717 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.env
*.pyc
__pycache__/
ptenv/
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM calthorpeanalytics/python3-geo:3.6.3-1.0.0

RUN mkdir /code
WORKDIR /code

RUN pip install numpy==1.12.1 --src /usr/local/src

COPY requirements.txt /code/
RUN pip install -r requirements.txt --src /usr/local/src --exists-action=w

COPY requirements_dev.txt /code/
RUN pip install -r requirements_dev.txt --src /usr/local/src --exists-action=w
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
test:
it test:
PYTHONPATH=. MPLBACKEND="agg" coverage run --source peartree -m py.test --verbose

performance:
PYTHONPATH=. MPLBACKEND="agg" pytest profiler/test_graph_assembly.py -s
PYTHONPATH=. MPLBACKEND="agg" pytest profiler/test_graph_assembly.py -s

notebook:
docker-compose build
mkdir ./notebooks
docker-compose up notebook

docker-clean:
docker network prune --force
docker volume prune --force
docker image prune --force
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

version: "3"

services:

# Jupyter Notebook
notebook:
build:
context: .
env_file: .env
command: jupyter notebook --config jupyter_notebook_config.py
volumes:
- .:/code
- /tmp:/tmp
ports:
- "9797:9797"
Loading

0 comments on commit 2600d9c

Please sign in to comment.