Skip to content

Commit

Permalink
update Dockerfile and example configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pleary committed Oct 31, 2023
1 parent 32d05ce commit 9f9a1e1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ models/*
test-obs*
lib/vision_cache/*
config.yml
env.list
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:3.10.5
FROM python:3.11.6

RUN apt-get update && apt-get install -y libgdal-dev

RUN useradd -ms /bin/bash inaturalist
USER inaturalist
Expand Down
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
CONFIG = {
"app_secret": os.environ["APP_SECRET"],
"models": [{
"name": os.environ["MODEL_NAME"],
"vision_model_path": os.environ["VISION_MODEL_PATH"],
"taxonomy_path": os.environ["TAXONOMY_PATH"],
"tf_geo_model_path": os.environ["TF_GEO_MODEL_PATH"]
"tf_geo_elevation_model_path": os.environ["TF_GEO_MODEL_PATH"],
"elevation_h3_r4": os.environ["ELEVATION_H3_R4_PATH"],
"tf_elev_thresholds": os.environ["GEO_THRESHOLDS_PATH"],
"taxon_ranges_path": os.environ["TAXON_RANGES_PATH"]
}]
}
if "GEO_MIN" in os.environ:
Expand Down
14 changes: 9 additions & 5 deletions config.yml.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
app_secret: "somesecret"
vision_model_path: "models/.../model.h5"
taxonomy_path: "models/.../taxonomy.csv"
tf_geo_model_path: "models/.../tf_gpmodel.h5"
pt_geo_model_path: "models/.../model.pth.tar"
use_pt_gp_model: False
models:
- name: "ModelGenerationName"
vision_model_path: "models/.../vision_model.h5"
taxonomy_path: "models/.../taxonomy.csv"
tf_geo_elevation_model_path: "models/.../tf_gpmodel.h5"
elevation_h3_r4: "models/.../elevation_r4_5m.csv"
tf_elev_thresholds: "models/.../thresholds.csv"
taxon_ranges_path: "models/.../taxon_ranges"
geo_min: 0.005
7 changes: 6 additions & 1 deletion env.list.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
APP_SECRET=somesecret
VISION_MODEL_PATH=models/.../model.h5
MODEL_NAME=ModelGenerationName
VISION_MODEL_PATH=models/.../vision_model.h5
TAXONOMY_PATH=models/.../taxonomy.csv
TF_GEO_MODEL_PATH=models/.../tf_gpmodel.h5
ELEVATION_H3_R4_PATH=models/.../elevation_r4_5m.csv
GEO_THRESHOLDS_PATH=models/.../thresholds.csv
TAXON_RANGES_PATH=models/.../taxon_ranges
GEO_MIN=0.005
33 changes: 17 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
scipy
six
flake8
Flask
Flask-WTF
h3
h3pandas
itsdangerous
jinja2
keras
matplotlib
numpy
tifffile
umap_learn
pandas
torch
Flask
Pillow
scikit_learn
pyyaml
Flask-WTF
prison
python-magic
keras
jinja2
itsdangerous
pyyaml
scikit_learn
scipy
six
tensorflow
tifffile
torch
umap_learn
werkzeug
WTForms
flake8
h3
h3pandas
prison

0 comments on commit 9f9a1e1

Please sign in to comment.