Skip to content

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

License

Notifications You must be signed in to change notification settings

ivanpanshin/flask_gunicorn_nginx_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published