Disclaimer: This post is not sponsored or supported in any way by Digital Ocean.
Run your Machine Learning model without paying a dime. Do this by receiving $100 for free by using our referral link. If you choose to spend $25 dollars besides the free credits, the referral program gives ML From Scratch an extra $25, which helps the website run smoothly.
Table Of Contents (Click To Scroll)
In four simple steps, you will see exactly how you can cheaply and simply deploy your model to the cloud within.
a. Installing Docker
b. Creating a $5 droplet (also known as virtual machine (VM))
c. Accessing your droplet
- Training Our Model
Preparing Our Model For Deployment:
a. Making A Flask Application
b. Running The Flask Application In A Container
Deploying Our Model:
a. Accessing The Online Application
- Final Things To Consider
The setup is crucial to make this tutorial work. We need to install docker, setup your droplet and make sure you can access it through SSH.
Note that you cannot use Docker with Windows Home – consider using a local Ubuntu VM by using Hyper-V on Windows instead.
Windows Pro/Enterprise/Education: Sign up and download Docker Desktop on Windows. Once logged in, you can download Docker. Make sure the program is running and that you are logged in locally.
MacOS: Sign up and download Docker Desktop on Mac. Once logged in, you can download Docker. Make sure the program is running and that you are logged in locally.
Linux: Use the three following command to download and start Docker:
apt install docker.io, 2)
systemctl start docker, and 3)
systemctl enable docker. You can login with
docker login if you have a registry you want to login in to.
Creating A Droplet
The next step is creating your Digital Ocean account and setting billing up. Remember you get $100 for free if you use our referral link.
After logging in, you want to look in the top right corner, click Create and then Droplets.
For this guide, you only have to modify the parts showed in the screenshots – meaning you will be using Ubuntu 18.04.3 since that is the standard. Start by expanding the plans by clicking Show all plans.
Then choose the $5 plan.
Next, choose a region, preferably the one closest to you or your customers.
We turned on monitoring, so you can see how much RAM, CPU, Disk, Network etc. is being used throughout time. We also chose to use a password for accessing the server, because it was the easiest way, but we recommend spending time setting up a SSH keys since it is much more secure.
As a last option, you can enable snapshot backups that you can revert to if something every goes wrong.
Accessing Your Droplet
After creating your droplet, click on your project name in the Projects tab in the left side menu, then click on you
Source - Continue Reading: https://mlfromscratch.com/cheap-deployment/