I am trying to install pyarrow==0.16.0 in a python:3.8 image on a mac m1 as a dependency for an internal package at work. I can't build it using docker build. I am also finding other packages such as numpy to be difficult or impossible to install on older python versions (3.7 and 3.8).
How do people build python containers with older package versions (that don't have ARM wheels) such as numpy and pyarrow on mac m1 for their local dev environment when they can't bump the version themselves?
Simple example that breaks is
dockerfile
FROM python:3.8
RUN apt update && apt install -y cmake
RUN pip install pyarrow==0.16.0
terminal
> docker build -t pyarrow .
Why do these behave differently and how do I get older pyarrows and numpys to work on python 3.7 and 3.8 containers.
result

Other Way (that works)
terminal
> docker run --rm -it python:3.8 bash
> pip install pyarrow==0.16.0
.
.
.