Dockerizing a web application for deployment to Heroku
Architecture
Note: This implementation was tested on Ubuntu 20.04, which is the recommended environment.
Steps to build and test
- Run the command
sudo docker build -t flask-mlapplication:latest .
and wait for the build process to complete - Run the command
sudo docker run --name flask-mlapplication -p 5000:5000 flask-mlapplication
, this will start the server. - Open the testfolder folder, and paste the images you want to test
- Open another terminal Run the python test script using the command
python testscript.py