{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# BentoML Demo: Titanic Survival Prediction with XGBoost\n", "\n", "\n", "**BentoML makes moving trained ML models to production easy:**\n", "\n", "* Package models trained with **any ML framework** and reproduce them for model serving in production\n", "* **Deploy anywhere** for online API serving or offline batch serving\n", "* High-Performance API model server with *adaptive micro-batching* support\n", "* Central hub for managing models and deployment process via Web UI and APIs\n", "* Modular and flexible design making it *adaptable to your infrastrcuture*\n", "\n", "BentoML is a framework for serving, managing, and deploying machine learning models. It is aiming to bridge the gap between Data Science and DevOps, and enable teams to deliver prediction services in a fast, repeatable, and scalable way.\n", "\n", "Before reading this example project, be sure to check out the [Getting started guide](https://github.com/bentoml/BentoML/blob/master/guides/quick-start/bentoml-quick-start-guide.ipynb) to learn about the basic concepts in BentoML.\n", "\n", "\n", "This notebook demonstrates use BentoML to serve a model trained with the XGBoost framework, specifically using the Titanic Survival dataset.\n", "\n", "\n", "Let's get started!\n", "![Impression](https://www.google-analytics.com/collect?v=1&tid=UA-112879361-3&cid=555&t=event&ec=xgboost&ea=xgboost-tiantic-survival-prediction&dt=xgboost-tiantic-survival-prediction)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%reload_ext autoreload\n", "%autoreload 2\n", "%matplotlib inline\n", "\n", "import warnings\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "!pip install -q --upgrade xgboost==0.90 numpy==1.18.5 pandas==1.0.4 bentoml" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import xgboost as xgb\n", "import bentoml" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Prepare Dataset\n", "download dataset from https://www.kaggle.com/c/titanic/data" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "mkdir: data: File exists\n", " % Total % Received % Xferd Average Speed Time Time Time Current\n", " Dload Upload Total Spent Left Speed\n", "100 60302 100 60302 0 0 133k 0 --:--:-- --:--:-- --:--:-- 133k\n", " % Total % Received % Xferd Average Speed Time Time Time Current\n", " Dload Upload Total Spent Left Speed\n", "100 28210 100 28210 0 0 62273 0 --:--:-- --:--:-- --:--:-- 62273\n" ] } ], "source": [ "!mkdir data\n", "!curl https://raw.githubusercontent.com/agconti/kaggle-titanic/master/data/train.csv -o ./data/train.csv\n", "!curl https://raw.githubusercontent.com/agconti/kaggle-titanic/master/data/test.csv -o ./data/test.csv" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "train = pd.read_csv(\"./data/train.csv\")\n", "test = pd.read_csv(\"./data/test.csv\")\n", "X_y_train = xgb.DMatrix(data=train[['Pclass', 'Age', 'Fare', 'SibSp', 'Parch']], label= train['Survived'])\n", "X_test = xgb.DMatrix(data=test[['Pclass', 'Age', 'Fare', 'SibSp', 'Parch']])" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PclassAgeFareSibSpParchSurvived
0322.07.2500100
1138.071.2833101
2326.07.9250001
3135.053.1000101
4335.08.0500000
\n", "
" ], "text/plain": [ " Pclass Age Fare SibSp Parch Survived\n", "0 3 22.0 7.2500 1 0 0\n", "1 1 38.0 71.2833 1 0 1\n", "2 3 26.0 7.9250 0 0 1\n", "3 1 35.0 53.1000 1 0 1\n", "4 3 35.0 8.0500 0 0 0" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "train[['Pclass', 'Age', 'Fare', 'SibSp', 'Parch', 'Survived']].head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Model Training" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[15:41:43] WARNING: /Users/travis/build/dmlc/xgboost/src/objective/regression_obj.cu:174: reg:linear is now deprecated in favor of reg:squarederror.\n", "[15:41:43] WARNING: /Users/travis/build/dmlc/xgboost/src/objective/regression_obj.cu:174: reg:linear is now deprecated in favor of reg:squarederror.\n" ] } ], "source": [ "params = {\n", " 'base_score': np.mean(train['Survived']),\n", " 'eta': 0.1,\n", " 'max_depth': 3,\n", " 'gamma' :3,\n", " 'objective' :'reg:linear',\n", " 'eval_metric' :'mae'\n", " }\n", "model = xgb.train(params=params, \n", " dtrain=X_y_train, \n", " num_boost_round=3)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PclassAgeFareSibSpParchpred
103NaN7.8958000.341580
11146.026.0000000.413966
\n", "
" ], "text/plain": [ " Pclass Age Fare SibSp Parch pred\n", "10 3 NaN 7.8958 0 0 0.341580\n", "11 1 46.0 26.0000 0 0 0.413966" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_test = model.predict(X_test)\n", "test['pred'] = y_test\n", "test[['Pclass', 'Age', 'Fare', 'SibSp', 'Parch','pred']].iloc[10:].head(2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create BentoService for model serving" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Overwriting xgboost_titanic_bento_service.py\n" ] } ], "source": [ "%%writefile xgboost_titanic_bento_service.py\n", "\n", "import xgboost as xgb\n", "\n", "import bentoml\n", "from bentoml.frameworks.xgboost import XgboostModelArtifact\n", "from bentoml.adapters import DataframeInput\n", "\n", "@bentoml.env(infer_pip_packages=True)\n", "@bentoml.artifacts([XgboostModelArtifact('model')])\n", "class TitanicSurvivalPredictionXgBoost(bentoml.BentoService):\n", " \n", " @bentoml.api(input=DataframeInput(), batch=True)\n", " def predict(self, df):\n", " data = xgb.DMatrix(data=df[['Pclass', 'Age', 'Fare', 'SibSp', 'Parch']])\n", " return self.artifacts.model.predict(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Create BentoService saved bundle" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2020-09-22 15:42:22,025] WARNING - Using BentoML installed in `editable` model, the local BentoML repository including all code changes will be packaged together with saved bundle created, under the './bundled_pip_dependencies' directory of the saved bundle.\n", "[2020-09-22 15:42:22,375] INFO - Using default docker base image: `None` specified inBentoML config file or env var. User must make sure that the docker base image either has Python 3.7 or conda installed.\n", "[2020-09-22 15:42:23,380] INFO - Detected non-PyPI-released BentoML installed, copying local BentoML modulefiles to target saved bundle path..\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "warning: no previously-included files matching '*~' found anywhere in distribution\n", "warning: no previously-included files matching '*.pyo' found anywhere in distribution\n", "warning: no previously-included files matching '.git' found anywhere in distribution\n", "warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution\n", "warning: no previously-included files matching '__pycache__' found anywhere in distribution\n", "no previously-included directories found matching 'e2e_tests'\n", "no previously-included directories found matching 'tests'\n", "no previously-included directories found matching 'benchmark'\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "UPDATING BentoML-0.9.0rc0+3.gcebf2015/bentoml/_version.py\n", "set BentoML-0.9.0rc0+3.gcebf2015/bentoml/_version.py to '0.9.0.pre+3.gcebf2015'\n", "[2020-09-22 15:42:27,403] INFO - BentoService bundle 'TitanicSurvivalPredictionXgBoost:20200922154223_4ACDA4' saved to: /Users/bozhaoyu/bentoml/repository/TitanicSurvivalPredictionXgBoost/20200922154223_4ACDA4\n" ] } ], "source": [ "# 1) import the custom BentoService defined above\n", "from xgboost_titanic_bento_service import TitanicSurvivalPredictionXgBoost\n", "\n", "# 2) `pack` it with required artifacts\n", "bento_service = TitanicSurvivalPredictionXgBoost()\n", "bento_service.pack('model', model)\n", "\n", "# 3) save your BentoSerivce\n", "saved_path = bento_service.save()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## REST API Model Serving\n", "\n", "\n", "To start a REST API model server with the BentoService saved above, use the bentoml serve command:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2020-09-22 15:43:00,146] INFO - Getting latest version TitanicSurvivalPredictionXgBoost:20200922154223_4ACDA4\n", "[2020-09-22 15:43:00,146] INFO - Starting BentoML API server in development mode..\n", "[2020-09-22 15:43:00,389] WARNING - Using BentoML installed in `editable` model, the local BentoML repository including all code changes will be packaged together with saved bundle created, under the './bundled_pip_dependencies' directory of the saved bundle.\n", "[2020-09-22 15:43:00,404] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "[2020-09-22 15:43:01,341] INFO - Using default docker base image: `None` specified inBentoML config file or env var. User must make sure that the docker base image either has Python 3.7 or conda installed.\n", "[15:43:01] WARNING: /Users/travis/build/dmlc/xgboost/src/objective/regression_obj.cu:174: reg:linear is now deprecated in favor of reg:squarederror.\n", " * Serving Flask app \"TitanicSurvivalPredictionXgBoost\" (lazy loading)\n", " * Environment: production\n", "\u001b[31m WARNING: This is a development server. Do not use it in a production deployment.\u001b[0m\n", "\u001b[2m Use a production WSGI server instead.\u001b[0m\n", " * Debug mode: off\n", " * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n", "[2020-09-22 15:43:10,246] INFO - {'service_name': 'TitanicSurvivalPredictionXgBoost', 'service_version': '20200922154223_4ACDA4', 'api': 'predict', 'task': {'data': {}, 'task_id': '72674164-f525-4914-8df7-d351ebba8079', 'batch': 1, 'http_headers': (('Host', 'localhost:5000'), ('User-Agent', 'curl/7.65.3'), ('Accept', '*/*'), ('Content-Type', 'application/json'), ('Content-Length', '63'))}, 'result': {'data': '[0.469721257686615]', 'http_status': 200, 'http_headers': (('Content-Type', 'application/json'),)}, 'request_id': '72674164-f525-4914-8df7-d351ebba8079'}\n", "127.0.0.1 - - [22/Sep/2020 15:43:10] \"\u001b[37mPOST /predict HTTP/1.1\u001b[0m\" 200 -\n", "WARNING: Logging before flag parsing goes to stderr.\n", "I0922 15:43:10.249207 4654042560 _internal.py:122] 127.0.0.1 - - [22/Sep/2020 15:43:10] \"\u001b[37mPOST /predict HTTP/1.1\u001b[0m\" 200 -\n", "^C\n" ] } ], "source": [ "!bentoml serve TitanicSurvivalPredictionXgBoost:latest" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you are running this notebook from Google Colab, you can start the dev server with `--run-with-ngrok` option, to gain acccess to the API endpoint via a public endpoint managed by [ngrok](https://ngrok.com/):" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!bentoml serve TitanicSurvivalPredictionXgBoost:latest --run-with-ngrok" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Open http://127.0.0.1:5000 to see more information about the REST APIs server in your\n", "browser.\n", "\n", "\n", "### Send prediction requeset to the REST API server\n", "\n", "Run the following `curl` command to send request data to REST API server and get a prediction result:\n", "\n", "```bash\n", "curl -i \\\n", "--header \"Content-Type: application/json\" \\\n", "--request POST \\\n", "--data '[{\"Pclass\": 1, \"Age\": 30, \"Fare\": 200, \"SibSp\": 1, \"Parch\": 0}]' \\\n", "localhost:5000/predict\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Containerize model server with Docker\n", "\n", "\n", "One common way of distributing this model API server for production deployment, is via Docker containers. And BentoML provides a convenient way to do that.\n", "\n", "Note that docker is **not available in Google Colab**. You will need to download and run this notebook locally to try out this containerization with docker feature.\n", "\n", "If you already have docker configured, simply run the follow command to product a docker container serving the IrisClassifier prediction service created above:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2020-09-22 15:43:25,886] INFO - Getting latest version TitanicSurvivalPredictionXgBoost:20200922154223_4ACDA4\n", "\u001b[39mFound Bento: /Users/bozhaoyu/bentoml/repository/TitanicSurvivalPredictionXgBoost/20200922154223_4ACDA4\u001b[0m\n", "[2020-09-22 15:43:25,932] WARNING - Using BentoML installed in `editable` model, the local BentoML repository including all code changes will be packaged together with saved bundle created, under the './bundled_pip_dependencies' directory of the saved bundle.\n", "[2020-09-22 15:43:25,958] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "\u001b[39mTag not specified, using tag parsed from BentoService: 'titanicsurvivalpredictionxgboost:20200922154223_4ACDA4'\u001b[0m\n", "Building Docker image titanicsurvivalpredictionxgboost:20200922154223_4ACDA4 from TitanicSurvivalPredictionXgBoost:latest \n", "-we in here\n", "processed docker file\n", "(None, None)\n", "root in create archive /Users/bozhaoyu/bentoml/repository/TitanicSurvivalPredictionXgBoost/20200922154223_4ACDA4 ['Dockerfile', 'MANIFEST.in', 'README.md', 'TitanicSurvivalPredictionXgBoost', 'TitanicSurvivalPredictionXgBoost/__init__.py', 'TitanicSurvivalPredictionXgBoost/__pycache__', 'TitanicSurvivalPredictionXgBoost/__pycache__/xgboost_titanic_bento_service.cpython-37.pyc', 'TitanicSurvivalPredictionXgBoost/artifacts', 'TitanicSurvivalPredictionXgBoost/artifacts/__init__.py', 'TitanicSurvivalPredictionXgBoost/artifacts/model.model', 'TitanicSurvivalPredictionXgBoost/bentoml.yml', 'TitanicSurvivalPredictionXgBoost/xgboost_titanic_bento_service.py', 'bentoml-init.sh', 'bentoml.yml', 'bundled_pip_dependencies', 'bundled_pip_dependencies/BentoML-0.9.0rc0+3.gcebf2015.tar.gz', 'docker-entrypoint.sh', 'environment.yml', 'python_version', 'requirements.txt', 'setup.py']\n", "about to build\n", "about to upgrade params\n", "check each param and update\n", "if use config proxy\n", "if buildargs\n", "if shmsize\n", "if labels\n", "if cache from\n", "if target\n", "if network_mode\n", "if squash\n", "if extra hosts is not None\n", "if platform is not None\n", "if isolcation is not None\n", "if context is not None\n", "setting auth {'Content-Type': 'application/tar'}\n", "\b-docker build {'t': 'titanicsurvivalpredictionxgboost:20200922154223_4ACDA4', 'remote': None, 'q': False, 'nocache': False, 'rm': False, 'forcerm': False, 'pull': False, 'dockerfile': (None, None)}\n", "\b/docker response \n", "context closes\n", "print responses\n", "\u001b[39mStep 1/15 : FROM bentoml/model-server:0.9.0.pre\u001b[0m\n", "\u001b[39m ---> a25066aa8b0e\u001b[0m\n", "\u001b[39mStep 2/15 : ARG EXTRA_PIP_INSTALL_ARGS=\u001b[0m\n", "\u001b[39m ---> Using cache\u001b[0m\n", "\u001b[39m ---> fc6e47d06522\u001b[0m\n", "\u001b[39mStep 3/15 : ENV EXTRA_PIP_INSTALL_ARGS $EXTRA_PIP_INSTALL_ARGS\u001b[0m\n", "\u001b[39m ---> Using cache\u001b[0m\n", "\u001b[39m ---> db8172e98571\u001b[0m\n", "\u001b[39mStep 4/15 : COPY environment.yml requirements.txt setup.sh* bentoml-init.sh python_version* /bento/\u001b[0m\n", "\b|\u001b[39m ---> a10efa4b16c9\u001b[0m\n", "\u001b[39mStep 5/15 : WORKDIR /bento\u001b[0m\n", "\b\\\u001b[39m ---> Running in 5f8d65af7025\u001b[0m\n", "\b/\u001b[39m ---> beef999ddff3\u001b[0m\n", "\u001b[39mStep 6/15 : RUN chmod +x /bento/bentoml-init.sh\u001b[0m\n", "\u001b[39m ---> Running in f3ca77c6fe53\u001b[0m\n", "\b/\u001b[39m ---> 5ef5b7bac8f1\u001b[0m\n", "\u001b[39mStep 7/15 : RUN if [ -f /bento/bentoml-init.sh ]; then bash -c /bento/bentoml-init.sh; fi\u001b[0m\n", "\u001b[39m ---> Running in da374f23bb44\u001b[0m\n", "\b-\u001b[39m\u001b[91m+++ dirname /bento/bentoml-init.sh\n", "\u001b[0m\u001b[0m\n", "\u001b[39m\u001b[91m++ cd /bento\n", "\u001b[0m\u001b[0m\n", "\u001b[39m\u001b[91m++ pwd -P\n", "\u001b[0m\u001b[0m\n", "\u001b[39m\u001b[91m+ SAVED_BUNDLE_PATH=/bento\n", "+ cd /bento\n", "+ '[' -f ./setup.sh ']'\n", "+ '[' -f ./python_version ']'\n", "\u001b[0m\u001b[0m\n", "\u001b[39m\u001b[91m++ cat ./python_version\n", "\u001b[0m\u001b[0m\n", "\b/\u001b[39m\u001b[91m+ PY_VERSION_SAVED=3.7.3\n", "+ DESIRED_PY_VERSION=3.7\n", "\u001b[0m\u001b[0m\n", "\u001b[39m\u001b[91m++ python -c 'import sys; print(f\"{sys.version_info.major}.{sys.version_info.minor}\")'\n", "\u001b[0m\u001b[0m\n", "\u001b[39mPython Version in docker base image 3.7 matches requirement python=3.7. Skipping.\u001b[0m\n", "\u001b[39mUpdating conda base environment with environment.yml\u001b[0m\n", "\u001b[39m\u001b[91m+ CURRENT_PY_VERSION=3.7\n", "+ [[ 3.7 == \\3\\.\\7 ]]\n", "+ echo 'Python Version in docker base image 3.7 matches requirement python=3.7. Skipping.'\n", "+ command -v conda\n", "+ echo 'Updating conda base environment with environment.yml'\n", "+ conda env update -n base -f ./environment.yml\n", "\u001b[0m\u001b[0m\n", "\b-\u001b[39mCollecting package metadata (repodata.json): ...working... \u001b[0m\n", "\b/\u001b[39mdone\n", "Solving environment: ...working... \u001b[0m\n", "\b\\\u001b[39mdone\u001b[0m\n", "\b-\u001b[39m\n", "Downloading and Extracting Packages\n", "python_abi-3.7 | 4 KB | | 0% \u001b[0m\n", "python_abi-3.7 | 4 KB | ########## | 100% \u001b[0m\n", "python_abi-3.7 | 4 KB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "pip-20.2.3 | 1.1 MB | | 0% \u001b[0m\n", "pip-20.2.3 | 1.1 MB | ##3 | 23% \u001b[0m\n", "pip-20.2.3 | 1.1 MB | ########## | 100% \u001b[0m\n", "pip-20.2.3 | 1.1 MB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "openssl-1.1.1h | 2.1 MB | | 0% \u001b[0m\n", "openssl-1.1.1h | 2.1 MB | ####3 | 43% \u001b[0m\n", "openssl-1.1.1h | 2.1 MB | ########## | 100% \u001b[0m\n", "openssl-1.1.1h | 2.1 MB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "ca-certificates-2020 | 145 KB | | 0% \u001b[0m\n", "ca-certificates-2020 | 145 KB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "cffi-1.14.3 | 223 KB | | 0% \u001b[0m\n", "cffi-1.14.3 | 223 KB | ########## | 100% \u001b[0m\n", "cffi-1.14.3 | 223 KB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "certifi-2020.6.20 | 151 KB | | 0% \u001b[0m\n", "certifi-2020.6.20 | 151 KB | ########## | 100% \u001b[0m\n", "certifi-2020.6.20 | 151 KB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "libffi-3.2.1 | 47 KB | | 0% \u001b[0m\n", "libffi-3.2.1 | 47 KB | ########## | 100% \u001b[0m\n", "\u001b[39m\n", "Preparing transaction: ...working... \u001b[0m\n", "\u001b[39mdone\u001b[0m\n", "\u001b[39mVerifying transaction: ...working... \u001b[0m\n", "\b-\u001b[39mdone\u001b[0m\n", "\u001b[39mExecuting transaction: ...working... \u001b[0m\n", "\b\\\u001b[39mdone\u001b[0m\n", "\b/\u001b[39m#\n", "# To activate this environment, use\n", "#\n", "# $ conda activate base\n", "#\n", "# To deactivate an active environment, use\n", "#\n", "# $ conda deactivate\u001b[0m\n", "\b|\u001b[39m\u001b[91m+ pip install -r ./requirements.txt --no-cache-dir\n", "\u001b[0m\u001b[0m\n", "\b\\\u001b[39mRequirement already satisfied: bentoml==0.9.0.pre in /opt/conda/lib/python3.7/site-packages (from -r ./requirements.txt (line 1)) (0.9.0rc0)\u001b[0m\n", "\b/\u001b[39mCollecting pandas==0.24.2\u001b[0m\n", "\b|\u001b[39m Downloading pandas-0.24.2-cp37-cp37m-manylinux1_x86_64.whl (10.1 MB)\u001b[0m\n", "\b|\u001b[39mCollecting xgboost==1.2.0\u001b[0m\n", "\u001b[39m Downloading xgboost-1.2.0-py3-none-manylinux2010_x86_64.whl (148.9 MB)\u001b[0m\n", "\b-\u001b[39mRequirement already satisfied: humanfriendly in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (8.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: python-json-logger in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.1.11)\u001b[0m\n", "\u001b[39mRequirement already satisfied: flask in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.1.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: configparser in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (5.0.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.19.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: prometheus-client in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.8.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: sqlalchemy>=1.3.0 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.3.19)\u001b[0m\n", "\u001b[39mRequirement already satisfied: tabulate in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.8.7)\u001b[0m\n", "\u001b[39mRequirement already satisfied: cerberus in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.3.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: sqlalchemy-utils<0.36.8 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.36.7)\u001b[0m\n", "\b/\u001b[39mRequirement already satisfied: python-dateutil<3.0.0,>=2.7.3 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (2.8.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied: alembic in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.4.3)\u001b[0m\n", "\u001b[39mRequirement already satisfied: multidict in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (4.7.6)\u001b[0m\n", "\u001b[39mRequirement already satisfied: grpcio<=1.27.2 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.27.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: gunicorn in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (20.0.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied: ruamel.yaml>=0.15.0 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.15.87)\u001b[0m\n", "\u001b[39mRequirement already satisfied: certifi in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (2020.6.20)\u001b[0m\n", "\u001b[39mRequirement already satisfied: py-zipkin in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.20.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: protobuf>=3.6.0 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (3.13.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: docker in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (4.3.1)\u001b[0m\n", "\b|\u001b[39mRequirement already satisfied: aiohttp in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (3.6.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: boto3 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.15.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: psutil in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (5.7.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: packaging in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (20.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied: click>=7.0 in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (7.1.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (2.24.0)\u001b[0m\n", "\b/\u001b[39mCollecting pytz>=2011k\u001b[0m\n", "\u001b[39m Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)\u001b[0m\n", "\b-\u001b[39mCollecting scipy\u001b[0m\n", "\b/\u001b[39m Downloading scipy-1.5.2-cp37-cp37m-manylinux1_x86_64.whl (25.9 MB)\u001b[0m\n", "\b/\u001b[39mRequirement already satisfied: Werkzeug>=0.15 in /opt/conda/lib/python3.7/site-packages (from flask->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.0.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied: itsdangerous>=0.24 in /opt/conda/lib/python3.7/site-packages (from flask->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.1.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: Jinja2>=2.10.1 in /opt/conda/lib/python3.7/site-packages (from flask->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (2.11.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: setuptools in /opt/conda/lib/python3.7/site-packages (from cerberus->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (49.6.0.post20200814)\u001b[0m\n", "\u001b[39mRequirement already satisfied: six in /opt/conda/lib/python3.7/site-packages (from sqlalchemy-utils<0.36.8->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.15.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: Mako in /opt/conda/lib/python3.7/site-packages (from alembic->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.1.3)\u001b[0m\n", "\u001b[39mRequirement already satisfied: python-editor>=0.3 in /opt/conda/lib/python3.7/site-packages (from alembic->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.0.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied: thriftpy2>=0.4.0 in /opt/conda/lib/python3.7/site-packages (from py-zipkin->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.4.11)\u001b[0m\n", "\u001b[39mRequirement already satisfied: websocket-client>=0.32.0 in /opt/conda/lib/python3.7/site-packages (from docker->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.57.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: yarl<2.0,>=1.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.5.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied: chardet<4.0,>=2.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (3.0.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied: async-timeout<4.0,>=3.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (3.0.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied: attrs>=17.3.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (20.2.0)\u001b[0m\n", "\b|\u001b[39mRequirement already satisfied: s3transfer<0.4.0,>=0.3.0 in /opt/conda/lib/python3.7/site-packages (from boto3->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.3.3)\u001b[0m\n", "\u001b[39mRequirement already satisfied: botocore<1.19.0,>=1.18.2 in /opt/conda/lib/python3.7/site-packages (from boto3->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.18.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied: jmespath<1.0.0,>=0.7.1 in /opt/conda/lib/python3.7/site-packages (from boto3->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (0.10.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.7/site-packages (from packaging->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (2.4.7)\u001b[0m\n", "\u001b[39mRequirement already satisfied: idna<3,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (2.10)\u001b[0m\n", "\u001b[39mRequirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.25.10)\u001b[0m\n", "\u001b[39mRequirement already satisfied: MarkupSafe>=0.23 in /opt/conda/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (1.1.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied: ply<4.0,>=3.4 in /opt/conda/lib/python3.7/site-packages (from thriftpy2>=0.4.0->py-zipkin->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (3.11)\u001b[0m\n", "\u001b[39mRequirement already satisfied: typing-extensions>=3.7.4; python_version < \"3.8\" in /opt/conda/lib/python3.7/site-packages (from yarl<2.0,>=1.0->aiohttp->bentoml==0.9.0.pre->-r ./requirements.txt (line 1)) (3.7.4.3)\u001b[0m\n", "\b\\\u001b[39mInstalling collected packages: pytz, pandas, scipy, xgboost\u001b[0m\n", "\b/\u001b[39mSuccessfully installed pandas-0.24.2 pytz-2020.1 scipy-1.5.2 xgboost-1.2.0\u001b[0m\n", "\b\\\u001b[39m ---> aa4db686ba89\u001b[0m\n", "\u001b[39mStep 8/15 : COPY . /bento\u001b[0m\n", "\b|\u001b[39m ---> 4bafca014215\u001b[0m\n", "\u001b[39mStep 9/15 : RUN if [ -d /bento/bundled_pip_dependencies ]; then pip install -U bundled_pip_dependencies/* ;fi\u001b[0m\n", "\u001b[39m ---> Running in 6d5fa028c021\u001b[0m\n", "\b-\u001b[39mProcessing ./bundled_pip_dependencies/BentoML-0.9.0rc0+3.gcebf2015.tar.gz\u001b[0m\n", "\b-\u001b[39m Installing build dependencies: started\u001b[0m\n", "\b\\\u001b[39m Installing build dependencies: finished with status 'done'\u001b[0m\n", "\u001b[39m Getting requirements to build wheel: started\u001b[0m\n", "\b-\u001b[39m Getting requirements to build wheel: finished with status 'done'\u001b[0m\n", "\u001b[39m Preparing wheel metadata: started\u001b[0m\n", "\b|\u001b[39m Preparing wheel metadata: finished with status 'done'\u001b[0m\n", "\b-\u001b[39mRequirement already satisfied, skipping upgrade: click>=7.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (7.1.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: docker in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (4.3.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: multidict in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (4.7.6)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: sqlalchemy-utils<0.36.8 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (0.36.7)\u001b[0m\n", "\b/\u001b[39mRequirement already satisfied, skipping upgrade: requests in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (2.24.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: flask in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.1.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: grpcio<=1.27.2 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.27.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: configparser in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (5.0.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: py-zipkin in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (0.20.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: alembic in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.4.3)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: sqlalchemy>=1.3.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.3.19)\u001b[0m\n", "\b|\u001b[39mRequirement already satisfied, skipping upgrade: python-dateutil<3.0.0,>=2.7.3 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (2.8.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: packaging in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (20.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: protobuf>=3.6.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (3.13.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: tabulate in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (0.8.7)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: gunicorn in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (20.0.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: psutil in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (5.7.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: humanfriendly in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (8.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: ruamel.yaml>=0.15.0 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (0.15.87)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: numpy in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.19.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: python-json-logger in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (0.1.11)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: aiohttp in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (3.6.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: certifi in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (2020.6.20)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: cerberus in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.3.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: boto3 in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (1.15.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: prometheus-client in /opt/conda/lib/python3.7/site-packages (from BentoML==0.9.0rc0+3.gcebf2015) (0.8.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: websocket-client>=0.32.0 in /opt/conda/lib/python3.7/site-packages (from docker->BentoML==0.9.0rc0+3.gcebf2015) (0.57.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: six>=1.4.0 in /opt/conda/lib/python3.7/site-packages (from docker->BentoML==0.9.0rc0+3.gcebf2015) (1.15.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: idna<3,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.9.0rc0+3.gcebf2015) (2.10)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.9.0rc0+3.gcebf2015) (3.0.4)\u001b[0m\n", "\b\\\u001b[39mRequirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->BentoML==0.9.0rc0+3.gcebf2015) (1.25.10)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: itsdangerous>=0.24 in /opt/conda/lib/python3.7/site-packages (from flask->BentoML==0.9.0rc0+3.gcebf2015) (1.1.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: Jinja2>=2.10.1 in /opt/conda/lib/python3.7/site-packages (from flask->BentoML==0.9.0rc0+3.gcebf2015) (2.11.2)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: Werkzeug>=0.15 in /opt/conda/lib/python3.7/site-packages (from flask->BentoML==0.9.0rc0+3.gcebf2015) (1.0.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: thriftpy2>=0.4.0 in /opt/conda/lib/python3.7/site-packages (from py-zipkin->BentoML==0.9.0rc0+3.gcebf2015) (0.4.11)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: python-editor>=0.3 in /opt/conda/lib/python3.7/site-packages (from alembic->BentoML==0.9.0rc0+3.gcebf2015) (1.0.4)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: Mako in /opt/conda/lib/python3.7/site-packages (from alembic->BentoML==0.9.0rc0+3.gcebf2015) (1.1.3)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in /opt/conda/lib/python3.7/site-packages (from packaging->BentoML==0.9.0rc0+3.gcebf2015) (2.4.7)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: setuptools in /opt/conda/lib/python3.7/site-packages (from protobuf>=3.6.0->BentoML==0.9.0rc0+3.gcebf2015) (49.6.0.post20200814)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: async-timeout<4.0,>=3.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->BentoML==0.9.0rc0+3.gcebf2015) (3.0.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: attrs>=17.3.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->BentoML==0.9.0rc0+3.gcebf2015) (20.2.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: yarl<2.0,>=1.0 in /opt/conda/lib/python3.7/site-packages (from aiohttp->BentoML==0.9.0rc0+3.gcebf2015) (1.5.1)\u001b[0m\n", "\b\u001b[39mRequirement already satisfied, skipping upgrade: botocore<1.19.0,>=1.18.2 in /opt/conda/lib/python3.7/site-packages (from boto3->BentoML==0.9.0rc0+3.gcebf2015) (1.18.2)\u001b[0m\n", "-\u001b[39mRequirement already satisfied, skipping upgrade: jmespath<1.0.0,>=0.7.1 in /opt/conda/lib/python3.7/site-packages (from boto3->BentoML==0.9.0rc0+3.gcebf2015) (0.10.0)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: s3transfer<0.4.0,>=0.3.0 in /opt/conda/lib/python3.7/site-packages (from boto3->BentoML==0.9.0rc0+3.gcebf2015) (0.3.3)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /opt/conda/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask->BentoML==0.9.0rc0+3.gcebf2015) (1.1.1)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: ply<4.0,>=3.4 in /opt/conda/lib/python3.7/site-packages (from thriftpy2>=0.4.0->py-zipkin->BentoML==0.9.0rc0+3.gcebf2015) (3.11)\u001b[0m\n", "\u001b[39mRequirement already satisfied, skipping upgrade: typing-extensions>=3.7.4; python_version < \"3.8\" in /opt/conda/lib/python3.7/site-packages (from yarl<2.0,>=1.0->aiohttp->BentoML==0.9.0rc0+3.gcebf2015) (3.7.4.3)\u001b[0m\n", "\u001b[39mBuilding wheels for collected packages: BentoML\u001b[0m\n", "\u001b[39m Building wheel for BentoML (PEP 517): started\u001b[0m\n", "\b/\u001b[39m Building wheel for BentoML (PEP 517): finished with status 'done'\u001b[0m\n", "\u001b[39m Created wheel for BentoML: filename=BentoML-0.9.0rc0+3.gcebf2015-py3-none-any.whl size=3064091 sha256=a49ace9338ca06346a0ec6749888d021774ab66106b4617a2935d82006d25f23\n", " Stored in directory: /root/.cache/pip/wheels/a0/45/41/62152db705af4ff47e7a3d6abf6247986eef4aa1b94a58d3b9\u001b[0m\n", "\u001b[39mSuccessfully built BentoML\u001b[0m\n", "\b/\u001b[39mInstalling collected packages: BentoML\u001b[0m\n", "\u001b[39m Attempting uninstall: BentoML\u001b[0m\n", "\u001b[39m Found existing installation: BentoML 0.9.0rc0\u001b[0m\n", "\b\\\u001b[39m Uninstalling BentoML-0.9.0rc0:\u001b[0m\n", "\b/\u001b[39m Successfully uninstalled BentoML-0.9.0rc0\u001b[0m\n", "\b\\\u001b[39mSuccessfully installed BentoML-0.9.0rc0+3.gcebf2015\u001b[0m\n", "\b\u001b[39m ---> 6cd0ae85c1b2\u001b[0m\n", "-\u001b[39mStep 10/15 : ENV PORT 5000\u001b[0m\n", "\u001b[39m ---> Running in cd6452eb4170\u001b[0m\n", "\b/\u001b[39m ---> 0487d34f357e\u001b[0m\n", "\u001b[39mStep 11/15 : EXPOSE $PORT\u001b[0m\n", "\u001b[39m ---> Running in e90e3a5071a6\u001b[0m\n", "\b\\\u001b[39m ---> 9ec18ef48e95\u001b[0m\n", "\u001b[39mStep 12/15 : COPY docker-entrypoint.sh /usr/local/bin/\u001b[0m\n", "\b-\u001b[39m ---> 7de3d800cd69\u001b[0m\n", "\u001b[39mStep 13/15 : RUN chmod +x /usr/local/bin/docker-entrypoint.sh\u001b[0m\n", "\b/\u001b[39m ---> Running in 38911bbbc5c6\u001b[0m\n", "\b|\u001b[39m ---> 2b4f7f4efcaf\u001b[0m\n", "\u001b[39mStep 14/15 : ENTRYPOINT [ \"docker-entrypoint.sh\" ]\u001b[0m\n", "\b\\\u001b[39m ---> Running in 1aa5f46c04ce\u001b[0m\n", "\b-\u001b[39m ---> 156b1f48734c\u001b[0m\n", "\u001b[39mStep 15/15 : CMD [\"bentoml\", \"serve-gunicorn\", \"/bento\"]\u001b[0m\n", "\u001b[39m ---> Running in 3b5142efcdba\u001b[0m\n", "\b/\u001b[39m ---> 19d4b648b2a6\u001b[0m\n", "\u001b[39mSuccessfully built 19d4b648b2a6\u001b[0m\n", "\u001b[39mSuccessfully tagged titanicsurvivalpredictionxgboost:20200922154223_4ACDA4\u001b[0m\n", "\u001b[32mFinished building titanicsurvivalpredictionxgboost:20200922154223_4ACDA4 from TitanicSurvivalPredictionXgBoost:latest\u001b[0m\n" ] } ], "source": [ "!bentoml containerize TitanicSurvivalPredictionXgBoost:latest" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next, you can docker push the image to your choice of registry for deployment, or run it locally for development and testing:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2020-09-22 22:47:14,344] INFO - Starting BentoML API server in production mode..\n", "[2020-09-22 22:47:14,742] INFO - get_gunicorn_num_of_workers: 3, calculated by cpu count\n", "[2020-09-22 22:47:14 +0000] [1] [INFO] Starting gunicorn 20.0.4\n", "[2020-09-22 22:47:14 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)\n", "[2020-09-22 22:47:14 +0000] [1] [INFO] Using worker: sync\n", "[2020-09-22 22:47:14 +0000] [11] [INFO] Booting worker with pid: 11\n", "[2020-09-22 22:47:14 +0000] [12] [INFO] Booting worker with pid: 12\n", "[2020-09-22 22:47:14 +0000] [13] [INFO] Booting worker with pid: 13\n", "[2020-09-22 22:47:15,001] WARNING - Using BentoML not from official PyPI release. In order to find the same version of BentoML when deploying your BentoService, you must set the 'core/bentoml_deploy_version' config to a http/git location of your BentoML fork, e.g.: 'bentoml_deploy_version = git+https://github.com/{username}/bentoml.git@{branch}'\n", "[2020-09-22 22:47:15,023] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "[2020-09-22 22:47:15,024] WARNING - Saved BentoService Python version mismatch: loading BentoService bundle created with Python version 3.7.3, but current environment version is 3.7.6.\n", "[2020-09-22 22:47:15,054] WARNING - Using BentoML not from official PyPI release. In order to find the same version of BentoML when deploying your BentoService, you must set the 'core/bentoml_deploy_version' config to a http/git location of your BentoML fork, e.g.: 'bentoml_deploy_version = git+https://github.com/{username}/bentoml.git@{branch}'\n", "[2020-09-22 22:47:15,076] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "[2020-09-22 22:47:15,076] WARNING - Saved BentoService Python version mismatch: loading BentoService bundle created with Python version 3.7.3, but current environment version is 3.7.6.\n", "[2020-09-22 22:47:15,198] WARNING - Using BentoML not from official PyPI release. In order to find the same version of BentoML when deploying your BentoService, you must set the 'core/bentoml_deploy_version' config to a http/git location of your BentoML fork, e.g.: 'bentoml_deploy_version = git+https://github.com/{username}/bentoml.git@{branch}'\n", "[2020-09-22 22:47:15,219] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "[2020-09-22 22:47:15,219] WARNING - Saved BentoService Python version mismatch: loading BentoService bundle created with Python version 3.7.3, but current environment version is 3.7.6.\n", "^C\n", "[2020-09-22 22:47:18 +0000] [1] [INFO] Handling signal: int\n", "[2020-09-22 22:47:18 +0000] [12] [INFO] Worker exiting (pid: 12)\n", "[2020-09-22 22:47:18 +0000] [11] [INFO] Worker exiting (pid: 11)\n", "[2020-09-22 22:47:18 +0000] [13] [INFO] Worker exiting (pid: 13)\n" ] } ], "source": [ "!docker run -p 5000:5000 titanicsurvivalpredictionxgboost:20200922154223_4ACDA4" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load saved BentoService\n", "\n", "bentoml.load is the API for loading a BentoML packaged model in python:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2020-09-22 15:47:22,359] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "[2020-09-22 15:47:22,360] WARNING - Module `xgboost_titanic_bento_service` already loaded, using existing imported module.\n", "[15:47:22] WARNING: /Users/travis/build/dmlc/xgboost/src/objective/regression_obj.cu:174: reg:linear is now deprecated in favor of reg:squarederror.\n", "[2020-09-22 15:47:22,363] WARNING - pip package requirement pandas already exist\n", "[2020-09-22 15:47:22,365] WARNING - pip package requirement xgboost already exist\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PclassAgeFareSibSpParchpred
0334.57.8292000.341580
1347.07.0000100.341580
2262.09.6875000.371730
3327.08.6625000.341580
4322.012.2875110.341580
5314.09.2250000.341580
6330.07.6292000.341580
7226.029.0000110.472451
8318.07.2292000.341580
9321.024.1500200.341580
103NaN7.8958000.341580
11146.026.0000000.413966
12123.082.2667100.469721
13263.026.0000100.413966
14147.061.1750100.445984
15224.027.7208100.437703
16235.012.3500000.371730
17321.07.2250000.341580
18327.07.9250100.341580
19345.07.2250000.341580
20155.059.4000100.445984
2139.03.1708010.341580
221NaN31.6833000.413966
23121.061.3792010.469721
24148.0262.3750130.445984
25350.014.5000100.341580
26122.061.9792010.469721
27322.57.2250000.341580
28141.030.5000000.437703
293NaN21.6792200.341580
.....................
388321.07.7500000.341580
38936.021.0750310.329523
390123.093.5000000.469721
391151.039.4000010.448714
392313.020.2500020.341580
393247.010.5000000.371730
394329.022.0250310.341580
395118.060.0000100.469721
396324.07.2500000.341580
397148.079.2000110.445984
398322.07.7750000.341580
399331.07.7333000.341580
400130.0164.8667000.469721
401238.021.0000100.437703
402122.059.4000010.469721
403117.047.1000000.437703
404143.027.7208100.413966
405220.013.8625000.437703
406223.010.5000100.371730
407150.0211.5000110.445984
4083NaN7.7208000.341580
40933.013.7750110.471721
4103NaN7.7500000.341580
411137.090.0000100.469721
412328.07.7750000.341580
4133NaN8.0500000.341580
414139.0108.9000000.469721
415338.57.2500000.341580
4163NaN8.0500000.341580
4173NaN22.3583110.341580
\n", "

418 rows × 6 columns

\n", "
" ], "text/plain": [ " Pclass Age Fare SibSp Parch pred\n", "0 3 34.5 7.8292 0 0 0.341580\n", "1 3 47.0 7.0000 1 0 0.341580\n", "2 2 62.0 9.6875 0 0 0.371730\n", "3 3 27.0 8.6625 0 0 0.341580\n", "4 3 22.0 12.2875 1 1 0.341580\n", "5 3 14.0 9.2250 0 0 0.341580\n", "6 3 30.0 7.6292 0 0 0.341580\n", "7 2 26.0 29.0000 1 1 0.472451\n", "8 3 18.0 7.2292 0 0 0.341580\n", "9 3 21.0 24.1500 2 0 0.341580\n", "10 3 NaN 7.8958 0 0 0.341580\n", "11 1 46.0 26.0000 0 0 0.413966\n", "12 1 23.0 82.2667 1 0 0.469721\n", "13 2 63.0 26.0000 1 0 0.413966\n", "14 1 47.0 61.1750 1 0 0.445984\n", "15 2 24.0 27.7208 1 0 0.437703\n", "16 2 35.0 12.3500 0 0 0.371730\n", "17 3 21.0 7.2250 0 0 0.341580\n", "18 3 27.0 7.9250 1 0 0.341580\n", "19 3 45.0 7.2250 0 0 0.341580\n", "20 1 55.0 59.4000 1 0 0.445984\n", "21 3 9.0 3.1708 0 1 0.341580\n", "22 1 NaN 31.6833 0 0 0.413966\n", "23 1 21.0 61.3792 0 1 0.469721\n", "24 1 48.0 262.3750 1 3 0.445984\n", "25 3 50.0 14.5000 1 0 0.341580\n", "26 1 22.0 61.9792 0 1 0.469721\n", "27 3 22.5 7.2250 0 0 0.341580\n", "28 1 41.0 30.5000 0 0 0.437703\n", "29 3 NaN 21.6792 2 0 0.341580\n", ".. ... ... ... ... ... ...\n", "388 3 21.0 7.7500 0 0 0.341580\n", "389 3 6.0 21.0750 3 1 0.329523\n", "390 1 23.0 93.5000 0 0 0.469721\n", "391 1 51.0 39.4000 0 1 0.448714\n", "392 3 13.0 20.2500 0 2 0.341580\n", "393 2 47.0 10.5000 0 0 0.371730\n", "394 3 29.0 22.0250 3 1 0.341580\n", "395 1 18.0 60.0000 1 0 0.469721\n", "396 3 24.0 7.2500 0 0 0.341580\n", "397 1 48.0 79.2000 1 1 0.445984\n", "398 3 22.0 7.7750 0 0 0.341580\n", "399 3 31.0 7.7333 0 0 0.341580\n", "400 1 30.0 164.8667 0 0 0.469721\n", "401 2 38.0 21.0000 1 0 0.437703\n", "402 1 22.0 59.4000 0 1 0.469721\n", "403 1 17.0 47.1000 0 0 0.437703\n", "404 1 43.0 27.7208 1 0 0.413966\n", "405 2 20.0 13.8625 0 0 0.437703\n", "406 2 23.0 10.5000 1 0 0.371730\n", "407 1 50.0 211.5000 1 1 0.445984\n", "408 3 NaN 7.7208 0 0 0.341580\n", "409 3 3.0 13.7750 1 1 0.471721\n", "410 3 NaN 7.7500 0 0 0.341580\n", "411 1 37.0 90.0000 1 0 0.469721\n", "412 3 28.0 7.7750 0 0 0.341580\n", "413 3 NaN 8.0500 0 0 0.341580\n", "414 1 39.0 108.9000 0 0 0.469721\n", "415 3 38.5 7.2500 0 0 0.341580\n", "416 3 NaN 8.0500 0 0 0.341580\n", "417 3 NaN 22.3583 1 1 0.341580\n", "\n", "[418 rows x 6 columns]" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import bentoml\n", "\n", "loaded_svc = bentoml.load(saved_path)\n", "\n", "result = loaded_svc.predict(test)\n", "test['pred'] = result\n", "test[['Pclass', 'Age', 'Fare', 'SibSp', 'Parch','pred']]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Launch inference job from CLI\n", "\n", "BentoML cli supports loading and running a packaged model from CLI. With the DataframeInput adapter, the CLI command supports reading input Dataframe data from CLI argument or local csv or json files:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2020-09-22 15:47:27,495] INFO - Getting latest version TitanicSurvivalPredictionXgBoost:20200922154223_4ACDA4\n", "[2020-09-22 15:47:27,533] WARNING - Using BentoML installed in `editable` model, the local BentoML repository including all code changes will be packaged together with saved bundle created, under the './bundled_pip_dependencies' directory of the saved bundle.\n", "[2020-09-22 15:47:27,549] WARNING - Saved BentoService bundle version mismatch: loading BentoService bundle create with BentoML version 0.9.0.pre, but loading from BentoML version 0.9.0.pre+3.gcebf2015\n", "[2020-09-22 15:47:28,744] INFO - Using default docker base image: `None` specified inBentoML config file or env var. User must make sure that the docker base image either has Python 3.7 or conda installed.\n", "[15:47:28] WARNING: /Users/travis/build/dmlc/xgboost/src/objective/regression_obj.cu:174: reg:linear is now deprecated in favor of reg:squarederror.\n", "[2020-09-22 15:47:31,407] INFO - {'service_name': 'TitanicSurvivalPredictionXgBoost', 'service_version': '20200922154223_4ACDA4', 'api': 'predict', 'task': {'data': {}, 'task_id': 'acc8e2a3-9ce7-4a18-aa34-164db3877cd0', 'batch': 1, 'cli_args': ('--input', '[{\"Pclass\": 1, \"Age\": 30, \"Fare\": 200, \"SibSp\": 1, \"Parch\": 0}]')}, 'result': {'data': '[0.469721257686615]', 'http_status': 200, 'http_headers': (('Content-Type', 'application/json'),)}, 'request_id': 'acc8e2a3-9ce7-4a18-aa34-164db3877cd0'}\n", "[0.469721257686615]\n" ] } ], "source": [ "!bentoml run TitanicSurvivalPredictionXgBoost:latest predict \\\n", " --input '[{\"Pclass\": 1, \"Age\": 30, \"Fare\": 200, \"SibSp\": 1, \"Parch\": 0}]' " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Deployment Options\n", "\n", "If you are at a small team with limited engineering or DevOps resources, try out automated deployment with BentoML CLI, currently supporting AWS Lambda, AWS SageMaker, and Azure Functions:\n", "- [AWS Lambda Deployment Guide](https://docs.bentoml.org/en/latest/deployment/aws_lambda.html)\n", "- [AWS SageMaker Deployment Guide](https://docs.bentoml.org/en/latest/deployment/aws_sagemaker.html)\n", "- [Azure Functions Deployment Guide](https://docs.bentoml.org/en/latest/deployment/azure_functions.html)\n", "\n", "If the cloud platform you are working with is not on the list above, try out these step-by-step guide on manually deploying BentoML packaged model to cloud platforms:\n", "- [AWS ECS Deployment](https://docs.bentoml.org/en/latest/deployment/aws_ecs.html)\n", "- [Google Cloud Run Deployment](https://docs.bentoml.org/en/latest/deployment/google_cloud_run.html)\n", "- [Azure container instance Deployment](https://docs.bentoml.org/en/latest/deployment/azure_container_instance.html)\n", "- [Heroku Deployment](https://docs.bentoml.org/en/latest/deployment/heroku.html)\n", "\n", "Lastly, if you have a DevOps or ML Engineering team who's operating a Kubernetes or OpenShift cluster, use the following guides as references for implementating your deployment strategy:\n", "- [Kubernetes Deployment](https://docs.bentoml.org/en/latest/deployment/kubernetes.html)\n", "- [Knative Deployment](https://docs.bentoml.org/en/latest/deployment/knative.html)\n", "- [Kubeflow Deployment](https://docs.bentoml.org/en/latest/deployment/kubeflow.html)\n", "- [KFServing Deployment](https://docs.bentoml.org/en/latest/deployment/kfserving.html)\n", "- [Clipper.ai Deployment Guide](https://docs.bentoml.org/en/latest/deployment/clipper.html)\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.6" } }, "nbformat": 4, "nbformat_minor": 4 }