debian-setup

Build Tools

As the name suggests these are for building packages. They are needed by Python and MXNet.

sudo apt-get install dpkg-dev libc6-dev gcc g++ gfortran make check

Note these packages are covered by the dev-bootstrap.sh script.

You can also check the build-essential meta-package which manages a similar list.

Linear Algebra Libraries

There are various scenarios where these libraries need to be explicitly installed. Such scenarios include:

  1. Python packages, such as numpy and scipy, installed in virtual environments
  2. Frameworks like MXNet that make their own packages
  3. Java packages that utilize JNI for backend computations

In Debian, we have the following options for linear algebra packages:

BLAS is for Basic Linear Algebra Subroutines. LAPACK is for Linear Algebra Package. The packages libblas3 and liblapack3 are the Fortran reference implementations from netlib.

The dev packages are included in the list for building other packages.

sudo apt-get install libblas3 libblas-dev liblapack3 liblapack-dev

“Currently ATLAS supplies optimized versions for the complete set of linear algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines in the LAPACK library.”

sudo apt-get install libatlas3-base libatlas-base-dev

Another optimized BLAS library. “Unlike Atlas, OpenBLAS provides a multiple architecture library. All kernel will be included in the library and dynamically switched to the best architecture at run time (only on x86 arches).” This package includes implementation of LAPACK.

sudo apt-get install libopenblas-base libopenblas-dev

Recommend either ATLAS or OpenBLAS. If you have multiple installs, you can choose which linear algebra library to use by update-alternatives,

sudo update-alternatives --config libblas.so.3
sudo update-alternatives --config liblapack.so.3

Finally see a similar summary on Debian’s Wiki of linear algebra libraries.