All Projects → tanujjain → deploy-ml-model

tanujjain / deploy-ml-model

Licence: MIT license
Deploying a simple machine learning model to an AWS ec2 instance using flask and docker.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to deploy-ml-model

Diamond
Diamond is a full-stack web-framework written in The D Programming Language using vibe.d
Stars: ✭ 173 (+147.14%)
Mutual labels:  webservice
HyRiver
A Python software stack for retrieving hydroclimate data from web services.
Stars: ✭ 68 (-2.86%)
Mutual labels:  webservice
ruby-grafana-reporter
Reporting Service for Grafana
Stars: ✭ 42 (-40%)
Mutual labels:  webservice
Jpasskit
jPasskit is an Java™ implementation of the Apple™ PassKit Web Service.
Stars: ✭ 184 (+162.86%)
Mutual labels:  webservice
CredentialRetriever
Retrieve Credentials from CyberArk Central Credential Provider Web Service, or Local Credential Provider using CLIPasswordSDK
Stars: ✭ 35 (-50%)
Mutual labels:  webservice
sigil
AWS SSM Session manager client
Stars: ✭ 67 (-4.29%)
Mutual labels:  ec2-instance
Webcc
Lightweight C++ HTTP client and server library based on Asio for embedding purpose.
Stars: ✭ 167 (+138.57%)
Mutual labels:  webservice
advanced-cloud-native-go
Advanced Cloud Native Go - Packt Publishing Video Course
Stars: ✭ 18 (-74.29%)
Mutual labels:  webservice
rest
REST webservices for TYPO3 CMS
Stars: ✭ 78 (+11.43%)
Mutual labels:  webservice
stork
Retrieve tokens from Vault for your EC2 instances.
Stars: ✭ 12 (-82.86%)
Mutual labels:  ec2-instance
Pyafipws
Factura Electrónica AFIP y otros servicios web (proyecto software libre) — Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll simil-ocx, pdf, dbf, xml, json, etc.) #python
Stars: ✭ 198 (+182.86%)
Mutual labels:  webservice
Goapp
An opinionated guideline to structure & develop a Go web application/service
Stars: ✭ 238 (+240%)
Mutual labels:  webservice
KeyLogger-WebService
"KeyLogger-WebService" Is a Keylogger Write In python.
Stars: ✭ 21 (-70%)
Mutual labels:  webservice
Mygpo
The gpodder.net webservice
Stars: ✭ 176 (+151.43%)
Mutual labels:  webservice
goat
AWS EBS-EC2 attach utility. UNMAINTAINED, SEE FORK ->
Stars: ✭ 29 (-58.57%)
Mutual labels:  ec2-instance
Afip.php
Libreria para usar los Web Services de AFIP
Stars: ✭ 171 (+144.29%)
Mutual labels:  webservice
XProc-Z
A platform for running XProc pipelines as web applications in a Java servlet container
Stars: ✭ 20 (-71.43%)
Mutual labels:  webservice
WebServiceDataProvider
一个用于动态调用WebService的C#类库
Stars: ✭ 33 (-52.86%)
Mutual labels:  webservice
api
Free Rest Webservices
Stars: ✭ 20 (-71.43%)
Mutual labels:  webservice
webservices
Prestashop Web Services + React JS App
Stars: ✭ 34 (-51.43%)
Mutual labels:  webservice

Serve a Machine Learning Model as a Webservice

Serving a simple machine learning model as a webservice using flask and docker.

Getting Started

  1. Use Model_training.ipynb to train a logistic regression model on the iris dataset and generate a pickled model file (iris_trained_model.pkl)
  2. Use app.py to wrap the inference logic in a flask server to serve the model as a REST webservice:
    • Execute the command python app.py to run the flask app.
    • Go to the browser and hit the url 0.0.0.0:80 to get a message Hello World! displayed. NOTE: A permission error may be received at this point. In this case, change the port number to 5000 in app.run() command in app.py. (Port 80 is a privileged port, so change it to some port that isn't, eg: 5000)
    • Next, run the below command in terminal to query the flask server to get a reply 2 for the model file provided in this repo:
       curl -X POST \
       0.0.0.0:80/predict \
       -H 'Content-Type: application/json' \
       -d '[5.9,3.0,5.1,1.8]'
    
  3. Run docker build -t app-iris . to build the docker image using Dockerfile. (Pay attention to the period in the docker build command)
  4. Run docker run -p 80:80 app-iris to run the docker container that got generated using the app-iris docker image. (This assumes that the port in app.py is set to 80)
  5. Use the below command in terminal to query the flask server to get a reply 2 for the model file provided in this repo:
        curl -X POST \
        0.0.0.0:80/predict \
        -H 'Content-Type: application/json' \
        -d '[5.9,3.0,5.1,1.8]'
    

For details on floating the containerized app on AWS ec2 instance, see the blog.

LICENSE

See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].