productionize - deploy ML models directly from Python [WIP] 
productionize is an open-source lightweight ML deployment tool.
You can containerize, deploy and ship your model, without ever
having to leave your beloved Python.
Installation
productionize is a Python library, which is hosted on PyPi. Currently, the functions are only supported on macOS. On the darwin platform you can therefore download the package using pip.
pip install productionize
Usage
Once the library is properly installed from PyPi, you can source it using your standard python import command. The core of the library are it's three main classes, those can be imported as follows:
# import lib
from productionize import workbench, product
Once the main classes are sourced, you can setup your very own workbench on your local machine. The workbench consists of several tools:
- Docker: a container technology, which helps us to build Docker container, which are the quasi-standard in Machine Learning deployment. You can read more about Docker here.
- VirtualBox: a driver that is needed to create a VM on you local machine to host the Kubernetes cluster, which is at the heart of the workbench. You can read more about VirtualBox here
- Kubectl: a cli which allows you to interact with Kubernetes. You won't have to do that, but
productionizeis running Kubernetes commands in the background. - Minikube: a local implemenation of Kubernetes. Minikube runs on a VM, which is administrated by Virtualbox.
To setup the workbench, these tools need to be installed. You can do this, by simple running the setup() method of the workbench class. Once initiated you can call the method.
# initiate class
cluster = workbench()
# install and setup components
cluster.setup()
To fire up the entire workbench, you first need to login to Docker Desktop. This is installed for you, however, you need to have it running. You can easily do this, just search on your computer - if you have a Mac you just use spotlight search - for Docker and start the application.
Next you will have to sign in. If you don't have an account already, you can create one for free at <a href="https://hub.docker.com>"Docker Hub. Which is a lot like GitHub, just for containers.
Once you did this, you are good to go on. You can now start the cluster using the start_cluster() method. This method allows you to set the resource quota for the cluster. Default are two CPUs and 2GB of memory.
# start the cluster
cluster.start_cluster(cpus = '2', memory = '2G')
To stop the cluster you can simply use the stop_cluster() method. This one just idles the cluster, but doesn't remove all the components.
# stop the cluster
cluster.stop_cluster()
To cleanly uninstall all the components, you can just run the uninstall() method and even specify which components to delete. The default is, that the components that existed on your machine before will be not removed.
# cleanly uninstall cluster components
cluster.uninstall(docker = None, kubectl = None, virtualbox = None, minikube = None, report = True)
Metadata
Release files for productionize 0.0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| productionize-0.0.4.1.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| productionize-0.0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.2 kB
Release files / productionize-0.0.4.1.tar.gz
| Download URL | productionize-0.0.4.1.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c58b8fc6f9fb116e42b9c1087d97ac8a89d88aacf9692c769b68f65fa75bb3e
|
|
BLAKE2b-256 checksum How to use checksums |
77b44791bbea1c257d2c6a66598f4aa06df12e82e5784078a5871cdaadda038c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
|
Release files / productionize-0.0.4.1-py3-none-any.whl
| Download URL | productionize-0.0.4.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
620b63e7175e60b9db3e1db5d7182b3035d3e7302ea67e22a09319f25c2e4d83
|
|
BLAKE2b-256 checksum How to use checksums |
61a9478ea564dae536ac71ab23c6294de057a67360a4d6cdfa50fb4488ec35d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
|