Skip to content

software-students-fall2024/4-containers-financiers

 
 

Repository files navigation

Lint-free Machine Learning Client CI Web App CI

Containerized Real-time Object Detection App

Description

This project is a containerized web application designed for real-time object detection using machine learning. The system is built with Flask for the frontend, a YOLOv5-based ML client for object detection, and MongoDB for backend data storage. This project demonstrates the power of Dockerized microservices for deploying scalable and modular systems.

Team members

Reyhan Abdul Quayum Rashed Alneyadi Sia Chen Yu Zhang

Architecture

               +------------------+
               |   User Uploads   |
               +------------------+
                        |
                        v
+------------------+  HTTP  +---------------------+
|   Flask Web App  |<------>|  ML Client (YOLOv5) |
+------------------+         +---------------------+
        |                               |
        |                               v
        +-----------------> MongoDB <---+
                         Store & Retrieve

Folder Structure

4-containers-financiers/
├── machine-learning-client/   # ML Client Service
│   ├── app.py                 # Flask app for YOLOv5 processing
│   ├── Dockerfile             # Docker configuration
│   └── requirements.txt       # Python dependencies
├── web-app/                   # Flask Web App
│   ├── app.py                 # Web interface and API endpoints
│   ├── test_app.py            # Pytest test suite
│   ├── Dockerfile             # Docker configuration
│   ├── templates/             # HTML templates
│   └── requirements.txt       # Python dependencies
├── docker-compose.yml         # Multi-container setup
└── README.md                  # Project documentation

Setup Instructions

Prerequisites

  • Docker Desktop

Installation

  1. Clone the repo:
git clone https://github.com/software-students-fall2024/4-containers-financiers.git
cd 4-containers-financiers
  1. If using Docker Desktop application, start Docker Desktop if you haven't already
  2. Build and start the containers with Docker Compose
docker-compose down
docker-compose build
docker-compose up
  1. If you are getting errors that ml-client is not healthy anad that web-app is not starting because of that (rare error), running docker-compose up again may solve the issue.
    docker-compose up
  2. Access the Web App.

You should be able to locally access web-app running on http://127.0.0.1:5000/

Alternatively, if you wish to access using virtual environments asa developer:

  1. Clone the repo:
git clone https://github.com/software-students-fall2024/4-containers-financiers.git
cd 4-containers-financiers
  1. Each subdirectory machine-learning-client and web-app have their own Pipfile and pipenv environment respectively a. To start the ml-client environment:
cd machine-learning-client
pipenv install
pipenv shell

b. To start the web-app environment:

cd .. # go to root directory
cd web-app
pipenv install
pipenv shell
  1. Access the web-app running on http://127.0.0.1:5000/ by accessing your web-app pipenv terminal

Thank you!

About

software-engineering-fall-2024-4-containers-containerized-app-exercise created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.8%
  • HTML 28.9%
  • Dockerfile 3.7%
  • CSS 3.6%