Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayberkyavuz/ml_model_server_docker_deployment
This repository is for containing source codes of machine learning model server deployment.
https://github.com/ayberkyavuz/ml_model_server_docker_deployment
deployment docker flask machine-learning model python random-forest scikit-learn
Last synced: 6 days ago
JSON representation
This repository is for containing source codes of machine learning model server deployment.
- Host: GitHub
- URL: https://github.com/ayberkyavuz/ml_model_server_docker_deployment
- Owner: AyberkYavuz
- Created: 2021-11-11T14:40:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-01T13:56:56.000Z (about 3 years ago)
- Last Synced: 2024-12-06T18:37:52.001Z (2 months ago)
- Topics: deployment, docker, flask, machine-learning, model, python, random-forest, scikit-learn
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ml_model_server_docker_deployment
This repository is for containing source codes of machine learning model server deployment.## Prerequisite
You need to have [docker](https://www.docker.com/products/docker-desktop)## Youtube Video of The Project
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/deFb1Y4XTXY/0.jpg)](http://www.youtube.com/watch?v=deFb1Y4XTXY)## Docker Deployment Instructions
1. clone this repo to your local machine2. open terminal
3. cd /path/to/ml_model_server_docker_deployment
4. start docker
5. use the following command to build the docker image
```bash
docker image build -t docker-iris-ml-server .
```6. use the following command to see docker images
```bash
docker image ls
```7. use the following command to run ml server
```bash
docker run -p 5000:5000 -d docker-iris-ml-server
```8. open http://localhost:5000/predict_class in your browser to see get method message
9. open postman and try http://localhost:5000/predict_class for the post method to get model prediction
For example; try the following in your POST request to get machine learning model prediction
```bash
{"sepal_length": 5.1, "sepal_width": 3.5,
"petal_length": 1.4, "petal_width": 0.2}
```10. use the following command to see CONTAINER ID
```bash
docker ps
```11. copy CONTAINER ID
12. use the following command to stop docker container
```bash
docker stop "CONTAINER ID"
```13. use the following command to free up all the resources that the docker container uses
```bash
docker system prune
```