pycaret.classification.create_docker#
- pycaret.classification.create_docker(api_name: str, base_image: str = 'python:3.11-slim', expose_port: int = 8000) None[source]#
This function creates a
Dockerfileandrequirements.txtfor productionalizing API end-point.Example
>>> from pycaret.datasets import get_data >>> juice = get_data('juice') >>> from pycaret.classification import * >>> exp_name = setup(data = juice, target = 'Purchase') >>> lr = create_model('lr') >>> create_api(lr, 'lr_api') >>> create_docker('lr_api')
- api_name: str
Name of API. Must be saved as a .py file in the same folder.
- base_image: str, default = “python:3.11-slim”
Name of the base image for Dockerfile.
- expose_port: int, default = 8000
port for expose for API in the Dockerfile.
- Returns:
None