First you could combine the different RUN commands into one. Then you could combine the build dependencies into a virtual package
RUN apk --update add --virtual ...
and remove this after pip3 install, as described here.
But in general I wouldn’t worry too much about the size of a single image and instead to try to limit the overall size of the system. Images consist of several layers (from the docs: “Each instruction in a Dockerfile creates a layer in the image.”). If you build all the images in the same way many of these layers will be shared between them and don’t require additional space.