A standard Python Docker image for a FastAPI application typically ranges from 150 MB to 1 GB, depending on the base image and dependencies. A Nuitka-compiled equivalent can drop to under 40 MB using a distroless base, with faster startup and no Python interpreter exposed in the container.
This guide covers the multi-stage build pattern that makes this work reliably.