Giter Site home page Giter Site logo

muhasuba / fast-ml-deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rodrigo-arenas/fast-ml-deploy

0.0 0.0 0.0 162 KB

Example repo of machine learning model deployment with Fast API and Docker

License: MIT License

Shell 2.25% Python 90.53% Dockerfile 7.22%

fast-ml-deploy's Introduction

fast-ml-deploy

Example repo of machine learning model deployment with FastAPI and Docker

This is a minimalistic build, consider to use user auth in a production environment

An article explaining the content of this repo can be found in this medium link

Demo instructions

1. Build the docker image

docker build -t iris-ml-build .

2. Run the container

docker run -d -p 80:80 --name iris-api iris-ml-build 

3. Run Pytest with coverage

docker exec -it iris-api pytest --ignore=tests/ --cov=app tests/ --cov-config=.coveragerc

4. Go to localhost

http://127.0.0.1/docs

5. Try out the post /predict method

curl -X POST "http://127.0.0.1/v1/iris/predict" -H\
 "accept: application/json"\
 -H "Content-Type: application/json"\
 -d "{\"data\":[[4.8,3,1.4,0.3],[2,1,3.2,1.1]]}"

fast-ml-deploy's People

Contributors

rodrigo-arenas avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.