Learn how to deploy a simple ML model to Back4app Containers using FastAPI & Docker.
To learn more check out the article.
-
Clone the repository.
-
Install the dependencies:
$ pip install -r requirements.txt
-
Run the FastAPI server:
$ uvicorn app.main:app --reload
-
Navigate to http://localhost:8000/docs in your favorite web browser.
-
Install Docker (if you don't have it yet).
-
Build and tag the image:
$ docker build -t iris-webapp:1.0 .
-
Start a new container:
$ docker run -p 8000:8000 --name iris-webapp iris-webapp:1.0
-
Navigate to http://localhost:8000/ in your favorite web browser.