https://github.com/waddafunk/containerized_ml
Template to dockerize a Tensorflow algorithm and serve its predictions as an API using Flask
https://github.com/waddafunk/containerized_ml
mlops mlops-community mlops-workflow tensorflow
Last synced: 2 months ago
JSON representation
Template to dockerize a Tensorflow algorithm and serve its predictions as an API using Flask
- Host: GitHub
- URL: https://github.com/waddafunk/containerized_ml
- Owner: waddafunk
- License: apache-2.0
- Created: 2022-12-21T15:56:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T22:14:29.000Z (over 3 years ago)
- Last Synced: 2025-07-20T08:33:48.735Z (11 months ago)
- Topics: mlops, mlops-community, mlops-workflow, tensorflow
- Language: Python
- Homepage:
- Size: 23.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# containerized_ml
Template to containerize a Tensorflow Machine Learning algorithm and serve its predictions as an API using Docker and Flask.
## Quickstart
* `git clone https://github.com/waddafunk/containerized_ml.git`.
* `cd containerized_ml`
* `docker compose up`
* `curl http://localhost:8000/cache_check` will print how many times the url has been visited
* `curl http://localhost:8000/tf_check` will print available resources
Add the services you want to add editing `app/server.py`. The bind mount (line 7-8 of `docker-compose.yml`) ensures that changes in the code are automatically loaded in the Flask server without the need to tear all down and load it back up. Just edit, save, and changes will be reflected in the app. **This behaviour is for development only and must be removed before production**.
Additional python libraries must be installed by editing `app/requirements.txt`.
Could fail if no NVIDIA GPUs are present on the machine.