How to Deploy your trained ML model in client VM without they getting access to code

I am new to deployment and have a basic doubt about deploying my ML code on client's vm.

So I have built a python project which collects data from client site, processing, predicts and displays the result in dashboard. I have to use client VMs for deployment. Is there a way for me to hide the code or do something to it so that client cannot see my code and reuse my code for other purposes.

Might sound trivial but really stuck at this. Thanks in advance.

Topic software-development python

Category Data Science


You can transform your python code into a standalone binary file, which could for example take as input some data and return the predicted labels. If you only put this file in the client's VM and not the .py files, the client could never see the code, but just execute it.

Several libraries exist for this purpose like pyinstaller

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.