• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Template for deploying ML models using Flask + Gunicorn + Nginx inside Docker

Template for deploying ML models using Flask + Gunicorn + Nginx inside Docker

Running the solution

In order to run this solution, you just have to install Docker, Docker compose, then clone this repository, and then:

bash run_docker.sh

For Docker installation instructions follow:

— Docker installation

— Make Docker run without root

— Docker Compose installation

Understanding the solution

— The detailed way: check my Medium post regarding this solution.

— The fast way: the project is structured as follows: Flask app and WSGI entry point are localed in flask_app directory. Nginx and project configuration files are located in nginx directory. Both directories contain Docker files that are connected using docker_compose.yml file in the main directory.

For simplicity, I also added run_docker.sh file for an even easier setting-up and running this solution.

.
├── flask_app 
│   ├── app.py          
│   ├── wsgi.py
│   └── Dockerfile
├── nginx
│   ├── nginx.conf          
│   ├── project.conf
│   └── Dockerfile
├── docker-compose.yml
└── run_docker.sh