-
Installation
- BentoML requires Python 3.7 or above.
pip install -r requirements.txt
- Install torch for your version
-
Creating a Service
-
python3 bento_packer.py
-
Go to http://localhost:5000 and check the connection
-
Using Python3
import requests res = requests.post("http://127.0.0.1:5000/predict", json={"text": "transformer"}) print(res.text) ## "<pad> 트랜스포머</s>"
-
-
Running the Yatai server :
bentoml yatai-service-start
Go to http://localhost:3000 and check the connection
-
Generate Docker Image
bentoml containerize TransformerService:latest
- For Mac With Apple Silicon
bentoml containerize --platform=linux/amd64 iris_classifier:latest
Run : locust -f locust.py
Go to http://localhost:8089 and check the connection
- Number of users : maximum number of users
- Spawn rate : User creations per second
- Host : Target address