Exercises

  1. Deploy model on Heroku.

  2. Set up your custom domain to point to your VPS.

  3. Repeat the setup on AWS, GCP, DigitalOcean or any other VPS of your choice.

  4. Read the documentation for flask, mlflow, pytorch, surprise, pandas.

  5. Replace Flask with Django and Starlette.

  6. Read up about function decorators in Python (see here and here for instance). Function decorators add functionality to an existing function, and are an example of metaprogramming.

  7. Try to set up HTTPS with Lets Encrypt for the flask based model deployed on a single VPS such as EC2.

  8. Add a WSGI server such as gunicorn. A Web Server Gateway Interface (WSGI) server implements the web server side of the WSGI interface for running Python web applications. See here.