Install BentoML#

BentoML is distributed as a Python package available on PyPI. You can install BentoML on Linux/UNIX, Windows, or macOS along with your preferred deep learning library to get started.

This quickstart describes how to install BentoML.

Prerequisites#

Install BentoML#

To install BentoML, use the following command:

pip install bentoml

To install all additional features in BentoML, such as gRPC and S3 support, use the all variant. Features can also be installed separately later.

pip install "bentoml[all]"

Install BentoML from source code#

If you want to install BentoML from the source, run the following command:

pip install git+https://github.com/bentoml/bentoml

This command installs the bleeding edge main version of BentoML, which is useful for staying up-to-date with the latest features and bug fixes. However, the main version may not always be stable. If you run into any issues, please either create an issue or join our community on Slack to get help.

Editable install#

You may want an editable install to:

  • Stay up-to-date with the latest features and bug fixes;

  • Contribute to the BentoML project and test code changes.

Clone the repository to your local folder and install BentoML with pip:

git clone https://github.com/bentoml/bentoml.git
cd bentoml
pip install -e .

This command installs BentoML in editable mode, which allows you to install the project without copying any files. Python links this folder and adds it to Python library paths. This means that any changes to the folder can be tested immediately.

For users with setuptools 64.0.0+

BentoML uses setuptools to build and package the project. Since setuptools 64.0.0, setuptools implemented PEP 660, which changes the behavior of editable install in comparison with previous versions.

Currently, BentoML is not compatible with this new behavior. To install BentoML in editable mode, you have to pass --config-settings editable_mode=compat to pip.

pip install -e ".[grpc]" --config-settings editable_mode=compat

See setuptools’ development mode guide for more information.

Warning

To keep using the library, you must not remove the bentoml folder after installing it in editable mode.

You can easily update your cloned repository with the latest changes on the main branch with the following command:

cd bentoml
git pull

See also#