Skip to content

Files

Latest commit

499b7ae · Mar 13, 2022

History

History

predict-server

Local Development

To start server locally, run:

python3 -m venv venv
source ./venv/bin/activate
pip3 install -r requirements.txt

export FLASK_APP=server
export FLASK_ENV=development
flask run

Deploy to Heroku

Since our server is inside subdirectory of a Git repository. So we need a little more works to deploy the APP to Heroku.

References:

heroku create nthu-oauth-decaptcha

Also, tensorflow is too big for a Heroku application that will exceed the 500MB limit of the slug size. So need to install tensorflow-cpu instead.

Reference:

New Relic Addons

To prevent heroku dyno from sleeping every 30 minutes. We add newrelic addon to ping the server health check endpoint every 15 minutes.

References: