Setup the GCP

Follow the given instructions to set up your GCP:

  1. Creating a new project: Click on the three dots shown in the following image and then click on the + sign to create a new project:

  2. Spinning a VM instance: Click on the three lines on the upper left corner of the screen, select the compute option, click on Compute Engine. Now choose Create new instance. Name the VM instance, select your zone as us-west2b. Choose the machine type size. 

    Choose your boot disk as Ubuntu 16.04 LTS. In firewall, options choose both http and https option (it's important to make it accessible from outer world). To opt for GPU options, you can click on customize button, and find the GPU options. You can choose between 2 NVIDIA GPUs. Check both "Allow HTTP traffic" and "Allow HTTPS traffic"

    Now click on Create. Boom your new VM is getting ready.

  3. Modify the Firewall settings: Now, click on the Firewall rules setting under Networking. Under protocols and ports, we need to select a port which we will use to export our APIs. We have chosen tcp:8080 as our port number. Now click on the Save button. This will assign a rule in the firewall of your VM to access the applications from the external world.

  4. Boot your VM: Now start your VM instance. When you see the green tick click on SSH. This will open a command window and now you are inside the VM. You can also use gcloud cli to login and access your VMs.

  5. Then follow the same steps which we performed to setup the local or read further to create an automation script which will perform all the setup automatically.

Now we need a web framework to write our DL applications as web services and there are again lots of option but to make it simple we will be using the combination of web.py Gunicorn.

If you want to know which web framework to choose based on memory consumption, CPU utilization, and so on. You can have a look at this comprehensive benchmarks http://klen.github.io/py-frameworks-bench.
Let's install them using following commands:
pip install web.py
pip install gunicorn

Now we are ready to deploy our Deep Learning solution as web services and scale it to the production level.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.220.83