How mohammad-oghli/ml-ops-docker works
Project type and purpose
• This is a small‐scale MLOps / containerized ML inference service (“Image Classifier Case Study”).
• Its goal is to wrap a pre‐trained computer‐vision model (OpenVINO IR files: .bin/.xml) in a Docker container and expose an HTTP inference endpoint via a Python server.
File structure
• Top level:
• docker-compose.yml – orchestrates service(s)
• animal_classify_img (presumably sample inputs)
• image-classifier/ – the inference service code + model artifacts
• img-classify-test.ipynb – optional notebook for local testing
• image-classifier/:
• Dockerfile – build instructions
• requirements.txt – Python dependencies
• config.py – runtime parameters (ports, model path)
• server.py – Flask/FastAPI HTTP server that loads the model and serves requests
• model/ – holds the compiled model IR (.bin/.xml)
• utils/ – helper code (e.g., class label mapping)
README
• Confirms this is an “ML Models Containerization using Docker” case study.
• No additional architectural details beyond Dockerized inference.
Main components
a. Client (e.g., curl, Postman, web frontend, or notebook)
b. Docker host / Docker Compose
c. image-classifier container
• Python runtime environment
• server.py (inference API layer)
• config.py (env configuration)
• utils (label mapping, pre/post processing)
• model loader (OpenVINO Inference Engine)
• model IR files (.xml + .bin)
d. (Optional) Notebook or test harness
Relationships and interactions
• Client → HTTP request → Docker host/Port mapping → container’s server.py
• server.py loads config → instantiates OpenVINO inference engine → reads model IR
• Incoming image → pre-processing (utils) → model inference → post-processing → HTTP response
• Docker Compose can spin up multiple replicas or link to other services (e.g., logging, monitoring) if extended
Architectural patterns / design principles
• Microservice style: a single container runs a single responsibility (inference).
• Twelve‐factor app elements: configuration via config.py/env vars, dependencies via requirements.txt, stateless inference.
• Decoupling: model artifacts are read from a mounted directory or baked into the image.
Relevant technologies
• Docker, Docker Compose
• Python (Flask or FastAPI in server.py)
• OpenVINO Inference Engine (model IR)
• Standard Python libs & custom utils
• (Optional) Jupyter Notebook for testing