#BentoML Heroku deployment tool
- An active Heroku account configured on the machine with AWS CLI installed and configured
- Install instruction: https://devcenter.heroku.com/articles/heroku-cli#getting-started
- Login Heroku CLI:
$heroku login
- Docker is installed and running on the machine.
- Install instruction: https://docs.docker.com/install
- Install required python packages
$ pip install -r requirements.txt
Use command line
$ python deploy.py <Bento_bundle_path> <Deployment_name> <Config_JSON default is heroku_config.json>
Example:
$ MY_BUNDLE_PATH=${bentoml get IrisClassifier:latest --print-location -q)
$ python deploy.py $MY_BUNDLE_PATH my_first_deployment heroku_config.jsonUse Python API
from deploy import deploy_heroku
deploy_heroku(BENTO_BUNDLE_PATH, DEPLOYMENT_NAME, CONFIG_JSON)dyno_counts: Amount of dyno running for the deployment, see https://devcenter.heroku.com/articles/dyno-types#default-scaling-limits for more information.dyno_type: Heroku dyno(instance) type, see https://devcenter.heroku.com/articles/dyno-types for more information
Use command line
$ python update.py <Bento_bundle_path> <Deployment_name> <Config_JSON>
Use Python API
from update import update_heroku
update_heroku(BENTO_BUNDLE_PATH, DEPLOYMENT_NAME, CONFIG_JSON)Use command line
$ python describe.py <Deployment_name>
Use Python API
from describe import describe_heroku
describe_heroku(DEPLOYMENT_NAME)Use command line
$ python delete.py <Deployment_name>
Use Python API
from delete import delete_heroku
delete_heroku(DEPLOYMENT_NAME)