FastAPI ML Template Run Web API Local $ sh run.sh # poetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 9000 Docker $ docker build -f Dockerfile -t fastapi-ml . $ docker run -p 9000:9000 --rm --name fastapi-ml -t -i fastapi-ml Docker Compose $ docker compose up --build Request Commands $ curl --request POST --url http://127.0.0.1:8000/api/v1/predict --header 'Content-Type: application/json' --data '{"input_text": "test"}' $ http POST http://127.0.0.1:8000/api/v1/predict input_text=テスト Development Run Tests and Linter $ poetry run tox Reference tiangolo/full-stack-fastapi-postgresql: Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more. eightBEC/fastapi-ml-skeleton: FastAPI Skeleton App to serve machine learning models production-ready.