Skip to main content

Deploying with custom Python environments

When you deploy, Modelbit will detect the pip packages needed to replicate your Notebook's environment.

To further customize the Python environment, use the python_version, python_packages and system_packages parameters.

To deploy to an environment with a specific version of sklearn:

mb.deploy(my_deploy_function, python_packages=["scikit-learn==1.0.2",])

To deploy to an environment with a specific versions of multiple pip packages:

mb.deploy(my_deploy_function, python_packages=["scikit-learn==1.0.2", "xgboost==1.5.2"])

To deploy to an environment with a specific version of Python:

mb.deploy(my_deploy_function, python_version="3.9")

To deploy to an environment with specific system libraries (installed using apt-get):

mb.deploy(my_deploy_function, system_packages=["libgomp1"])

With customized Python environment it's possible to deploy many kinds of models. Here are some examples:

Including additional files‚Äč

Modelbit has different workflows depending on how you want to add additional Python files with your deployments: