Skip to content

ledatascientist/deploy-ml-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deploy-ml-fastapi

Deploy ml model with fastapi and docker container.

How to use ?

  1. create and activate a virtual env
python -m venv virtual-env
source virtual-env/bin/activate

  1. Install requirements
pip install -r requirements.txt
  1. Generate model dump (optional)
python models/generate_pipeline.py
  1. Run api server You can get more information on uvicorn here and FastApi here
uvicorn main:app  --app-dir api
  1. Build docker image
docker build -t deploy-ml-fastapi .
  1. Run docker container
docker run -d --name sentiment-analysis-api -p 80:80 deploy-ml-fastapi

About

Deploy ml model with fastapi and docker container.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages