All Projects → davidefiocco → Streamlit Fastapi Model Serving

davidefiocco / Streamlit Fastapi Model Serving

Licence: mit
Simple web app example using streamlit and FastAPI to serve a PyTorch model

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Streamlit Fastapi Model Serving

Docker Compose
常用的 docker-compose 文件
Stars: ✭ 87 (-9.37%)
Mutual labels:  docker-compose
Nodejs Backend Architecture Typescript
Node.js Backend Architecture Typescript - Learn to build a backend server for Blogging platform like Medium, FreeCodeCamp, MindOrks, AfterAcademy - Learn to write unit and integration tests - Learn to use Docker image - Open-Source Project By AfterAcademy
Stars: ✭ 1,292 (+1245.83%)
Mutual labels:  docker-compose
Porter
A docker based multi-site setup for local PHP development. Inspired by Laravel Valet, Homestead and Vessel.
Stars: ✭ 92 (-4.17%)
Mutual labels:  docker-compose
Docker springboot tomcat mysql demo
How to setup docker with SpringBoot on Tomcat and MySQL
Stars: ✭ 88 (-8.33%)
Mutual labels:  docker-compose
Barge
🐳 Docker Compose files for the full Ocean Protocol stack
Stars: ✭ 88 (-8.33%)
Mutual labels:  docker-compose
Sci Pype
A Machine Learning API with native redis caching and export + import using S3. Analyze entire datasets using an API for building, training, testing, analyzing, extracting, importing, and archiving. This repository can run from a docker container or from the repository.
Stars: ✭ 90 (-6.25%)
Mutual labels:  docker-compose
Mechanist
[Docker] - The Mechanist is a collection of Dockerfiles and Composefiles for various tools and purposes.
Stars: ✭ 86 (-10.42%)
Mutual labels:  docker-compose
Nextcloud Libreoffice Online
Docker configuration for Nextcloud with LibreOffice Online (plain http, no SSL support)
Stars: ✭ 92 (-4.17%)
Mutual labels:  docker-compose
Dockerfiles
Just some Dockerfiles I'm playing around with.
Stars: ✭ 88 (-8.33%)
Mutual labels:  docker-compose
Docker Experiments
Discover docker with a simple use case in development, production (local kubernetes) and CI
Stars: ✭ 92 (-4.17%)
Mutual labels:  docker-compose
Docker Series
Docker Series about containerizing ASP.NET Core app with MySQL..
Stars: ✭ 88 (-8.33%)
Mutual labels:  docker-compose
Docker Compose Lamp
A basic LAMP stack environment built using Docker Compose.
Stars: ✭ 1,284 (+1237.5%)
Mutual labels:  docker-compose
Docker Symfony
🐳 A docker multicontainer with NGINX, PHP7-FPM, MySQL and ELK (Elasticsearch Logstash and Kibana)
Stars: ✭ 1,305 (+1259.38%)
Mutual labels:  docker-compose
Docker Django Example
A production ready example Django app that's using Docker and Docker Compose.
Stars: ✭ 86 (-10.42%)
Mutual labels:  docker-compose
Django Project Template
Thorgate's Django project template - Django, React, Sass, optional Docker and more
Stars: ✭ 91 (-5.21%)
Mutual labels:  docker-compose
Docker Cloud Platform
使用Docker构建云平台,Docker云平台系列共三讲,Docker基础、Docker进阶、基于Docker的云平台方案。OpenStack+Docker+RestAPI+OAuth/HMAC+RabbitMQ/ZMQ+OpenResty/HAProxy/Nginx/APIGateway+Bootstrap/AngularJS+Ansible+K8S/Mesos/Marathon构建/探索微服务最佳实践。
Stars: ✭ 86 (-10.42%)
Mutual labels:  docker-compose
Docker Multistreamer
Dockerized multistreamer
Stars: ✭ 90 (-6.25%)
Mutual labels:  docker-compose
Docker Nginx Php Mysql
Docker running Nginx, PHP-FPM, MySQL & PHPMyAdmin
Stars: ✭ 1,322 (+1277.08%)
Mutual labels:  docker-compose
React Pinpoint
An open source utility library for measuring React component render times.
Stars: ✭ 93 (-3.12%)
Mutual labels:  docker-compose
Dotnetcore Microservices Poc
Very simplified insurance sales system made in a microservices architecture using .NET Core
Stars: ✭ 1,304 (+1258.33%)
Mutual labels:  docker-compose

streamlit-fastapi-model-serving

Simple example of usage of streamlit and FastAPI for ML model serving described on this blogpost and PyConES 2020 video.

When developing simple APIs that serve machine learning models, it can be useful to have both a backend (with API documentation) for other applications to call and a frontend for users to experiment with the functionality.

In this example, we serve an image semantic segmentation model using FastAPI for the backend service and streamlit for the frontend service. docker-compose orchestrates the two services and allows communication between them.

To run the example in a machine running Docker and docker-compose, run:

docker-compose build
docker-compose up

To visit the FastAPI documentation of the resulting service, visit http://localhost:8000 with a web browser.
To visit the streamlit UI, visit http://localhost:8501.

Logs can be inspected via:

docker-compose logs

Deployment

To deploy the app, one option is deployment on Heroku (with Dockhero). To do so:

  • rename docker-compose.yml to dockhero-compose.yml
  • create an app (we refer to its name as <my-app>) on a Heroku account
  • install locally the Heroku CLI, and enable the Dockhero plugin with heroku plugins:install dockhero
  • add to the app the DockHero add-on (and with a plan allowing enough RAM to run the model!)
  • in a command line enter heroku dh:compose up -d --app <my-app> to deploy the app
  • to find the address of the app on the web, enter heroku dh:open --app <my-app>
  • to visualize the api, visit the address adding port 8000/docs, e.g. http://dockhero-<named-assigned-to-my-app>-12345.dockhero.io:8000/docs(not https)
  • visit the address adding :8501 to visit the streamlit interface
  • logs are accessible via heroku logs -p dockhero --app <my-app>

Debugging

To modify and debug the app, development in containers can be useful (and kind of fun!).

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].