This story puts a specific focus on creating a docker image for one of my independent deep learning project using detectron2 (Facebook AI) as the backbone. I might write about that project too!
There were many medium articles and docs but everywhere either they have gone into too much details or are simply incomplete. Thus I decided to write an article so that you guys don’t have to surf the internet for a day.
Dockerizing your Flask application, before uploading on a platform such as heroku has many upsides to it. You are not limited to the features offered by Heroku and can move your application to any cloud provider. All you have to do is just deploy the Docker image onto your new provider.
If you don’t know much about Docker then it’s fine too! I have covered all necessary information here.
Contents:
- Why Docker??
- Docker Installation
- Creating and docker image
- Deploying image on Heroku
- Releasing the image for production
Why Docker??
Alright we get it, ‘Cloud’ is the future. Platform as a Service (PaaS) is cool! What possibilities it explores are much cooler. Containerizing an application is a great way to deploy a machine learning model into production.
Docker uses OS-level virtualization to deliver software packages called containers. For developers and those experimenting with Docker, Docker Hub is your starting point into Docker containers.
Difference between Docker image and container
Docker image is a software package you build on your dev project. A docker container run on the image. There could be multiple containers on an image. This difference is very subtle and many new developers often use wrong terminologies. Read it again if you didn’t understood.
Introduction to Dockerfile
Dockerfile is a text file (without any extension) which tells docker daemon how to build a custom docker image.