Deployment
Up to this point, the data science team has a Flask web service that works on a local system. However, the web development team is still not in a position to use the service, since it only runs on a local system. So, we need to host this web service somewhere on a cloud platform so that it is also available for the web development team to use. This section provides a basic pipeline for the deployment to work, which can be broken down into the following steps:
- Make changes to the Flask web app so that it can be deployed.
- Use Docker to wrap the flask web application into a container.
- Host the container on an Amazon Web Services (AWS) EC2 instance.
Let's look at each of these steps in detail.
Making Changes to a Flask Web App
The flask application that was coded in the FLASK section ran on a local web address: http://127.0.0.1:5000. Since our intention is to host it on the internet, this address needs to be changed to: 0.0.0.0. Additionally, since the default HTTP...