Deploying with custom Python environments
When you deploy, Modelbit will detect the pip
packages needed to replicate your Notebook's environment.
To supply a custom Python environment, use the python_version
, python_packages
and system_packages
parameters.
To deploy to a custom environment with a specific version of sklearn
:
mb.deploy(my_deploy_function, python_packages=["scikit-learn==1.0.2",])
To deploy to a custom 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 a custom environment with a specific version of Python:
mb.deploy(my_deploy_function, python_version="3.9")
To deploy to a custom environment with specific system libraries (installed using apt-get
):
mb.deploy(my_deploy_function, system_packages=["libgomp1"])
With custom Python environment it's possible to deploy many kinds of models. Here are some examples:
- Example sklearn deployment
- Example XGBoost deployment
- Example PyCaret deployment
- Example Prince PCA deployment
- Example BTYD deployment
- Example Prophet deployment
- Example fasttext deployment
Including private packages in your Python environments
You can also upload shared Python libraries and helper code to be available in your Python environments.