Support for ARM64
Since the documentation didn't talk about it, I was wondering if it is possible to install alibi detect in a Docker image that use an arm64 based base image and builds like: docker buildx build --no-cache --platform linux/arm64?
I tried but I get the following error:
ERROR: Could not find a version that satisfies the requirement tensorflow-cpu!=2.6.0,!=2.6.1,<2.10.0,>=2.2.0 (from alibi-detect) (from versions: none) ERROR: No matching distribution found for tensorflow-cpu!=2.6.0,!=2.6.1,<2.10.0,>=2.2.0
My Docker uses this as base image: FROM arm64v8/python:3.8-slim
Now I can install tensorflow-aarch64 2.12.0, but then alibi-detect doesn't build because numpy versions are incompatible. If I upgrade numpy, then numba is incompatible. Issues kept popping up as I kept resolving previous ones.
Now I am wondering if it is evn possible to build alibi-detect for arm64. Any suggestions ?
I think, as you have discovered, the question is more about what the support of or various dependencies is for arm64, including versions. If a matching set can be found then alibi-detect should build as we are a pure Python library ourselves.
Wrt numpy, it's usually a build dependency for lots of other libraries like numba and tensorflow, usually what you want is to use an older numpy version (some dependencies specify this as the oldest-supported-numpy metapackage, so it's worth checking what this is for numba and tensorflow and then installing that version of numpy first before building everything else.)
As a follow-up, tensorflow has shipped arm64 wheels since version 2.10 so these should be installable without building by using the usual tensorflow PyPI package: https://pypi.org/project/tensorflow/2.10.0/#files
Similarly, it looks like numba is also shipping pre-built wheels: https://pypi.org/project/numba/0.56.4/#files and also numpy: https://pypi.org/project/numpy/#files
One problem is this dependency (tensorflow-io-gcs-filesystem): https://github.com/tensorflow/io/issues/1617
One problem is this dependency (tensorflow-io-gcs-filesystem): tensorflow/io#1617
Isn't arm64v8/python:3.8-slim a linux based image? That link mostly talks about arm64 on macos M1 chips.