In order to support OpenBLAS in NumPy, one need to manually build it from source using site.cfg
config.
- 30.5Mb Official Python Alpine-based image.
- 10.8Mb OpenBlas
/opt/OpenBLAS
dependency. - 58.0Mb = 32.9Mb NumPy + 21.9Mb gfortran + misc.
- Use parallel build
python setup.py build --parallel=$(nproc)
, it saves ~70% of time. - In order to pass C flags to python use
CFLAGS="-Ofast"
. It overrides original settings, see documentation. - NumPy is installed to
/usr/local/lib/python3.6/site-packages/
.
- What is the relation between BLAS, LAPACK and ATLAS @StackOverflow.
- Numerical Linear Algebra Packages on Linux: BLAS, LAPACK, ATLAS.
- BLAS, LAPACK, CLAPACK, LAPACKE, ATLAS, OpenBLAS tutorials in C.