kaldi icon indicating copy to clipboard operation
kaldi copied to clipboard

Could not find libatlas.a

Open kaikiat opened this issue 3 years ago • 1 comments

Hi team, I am building a Docker image using kalid

The script fails at the second command

#Commit on May 15, 2019 
ENV KALDI_SHA1 35f96db7082559a57dcc222218db3f0be6dd7983
RUN git clone https://github.com/kaldi-asr/kaldi && \
    cd /home/appuser/opt/kaldi && \
    git reset --hard $KALDI_SHA1 && \
    cd /home/appuser/opt/kaldi/tools && \
    make -j 8 && \
    ./install_portaudio.sh

RUN cd /home/appuser/opt/kaldi/src && ./configure --shared --mathlib=ATLAS && \
    sed -i '/-g # -O0 -DKALDI_PARANOID/c\-O3 -DNDEBUG' kaldi.mk && \
    make -j 8 depend && make -j 8 && \
    cd /home/appuser/opt/kaldi/src/online && make -j 8 depend && make -j 8 && \
    cd /home/appuser/opt/kaldi/src/gst-plugin && make -j 8 depend && make -j 8

This is the error message

 > [20/34] RUN cd /home/appuser/opt/kaldi/src && ./configure --shared --mathlib=ATLAS &&     sed -i '/-g # -O0 -DKALDI_PARANOID/c\-O3 -DNDEBUG' kaldi.mk &&     make -j 2 depend && make -j 2 &&     cd /home/appuser/opt/kaldi/src/online && make -j 2 depend && make -j 2 &&     cd /home/appuser/opt/kaldi/src/gst-plugin && make -j 2 depend && make -j 2:
#23 0.227 Configuring KALDI to use ATLAS.
#23 0.227 Checking compiler g++ ...
#23 0.233 Checking OpenFst library in /home/appuser/opt/kaldi/tools/openfst-1.6.7 ...
#23 0.239 Checking cub library in /home/appuser/opt/kaldi/tools/cub-1.8.0 ...
#23 0.239 Doing OS specific configurations ...
#23 0.242 On Linux: Checking for linear algebra header files ...
#23 0.242 Using ATLAS as the linear algebra library.
#23 0.260 Could not find libatlas.a in any of the generic-Linux places, but we'll try other stuff...
#23 0.260 ** Failed to configure ATLAS libraries ***
#23 0.260 **  ERROR   **
#23 0.260 ** Configure cannot proceed automatically.
#23 0.260 **  If you know that you have ATLAS installed somewhere on your machine, you
#23 0.260 ** may be able to proceed by replacing [somewhere] in kaldi.mk with a directory.
#23 0.260 **  If you have sudo (root) access you could install the ATLAS package on your
#23 0.260 ** machine, e.g. 'sudo apt-get install libatlas-dev libatlas-base-dev' or
#23 0.260 ** 'sudo yum install atlas.x86_64' or 'sudo zypper install libatlas3-devel',
#23 0.260 ** or on cygwin, install atlas from the installer GUI; and then run ./configure
#23 0.260 ** again.
#23 0.260 **
#23 0.260 **  Otherwise (or if you prefer OpenBLAS for speed), you could go the OpenBLAS
#23 0.260 ** route: cd to ../tools, type 'extras/install_openblas.sh', cd back to here,
#23 0.260 ** and type './configure  --mathlib=OPENBLAS'

I am using mac m1 to build the image, does anyone know what is the issue here ? Thank you

kaikiat avatar Aug 07 '22 17:08 kaikiat

normally you wouldn't use atlas on mac, mac has its own implementation of BLAS. Removing the "--mathlib=ATLAS" option would be the easiest way, the INSTALL instructions tell you how to install on mac. Perhaps that docker image was not intended to be installed on a mac?

danpovey avatar Aug 07 '22 20:08 danpovey

I'm confused because even on macs, the docker uses linux images. Not sure if the M1/2 mac uses arm64 images or amd64 as the previous macs, tho. If still amd64, you can use your package system to install atlas. OpenBLAS might be a more suitable choice and should work on arm64 as well. Please let us know if this is still an ongoing issue or you have resolved it.

jtrmal avatar Aug 18 '22 11:08 jtrmal

@jtrmal , I have resolved the issue by creating the docker image in a vm instance on GCP.

kaikiat avatar Aug 18 '22 12:08 kaikiat

ok, if it will be any help, we should be having weekly updated docker images on docker hub now I'm closing this but please let us know if you have any more questions or findings on the original issue y.

On Thu, Aug 18, 2022 at 2:08 PM Kai Kiat Poh @.***> wrote:

@jtrmal https://github.com/jtrmal , I have resolved the issue by creating the docker image in a vm instance on GCP.

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4769#issuecomment-1219413473, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX4H4MTUE7TOHZCEJALVZYRVDANCNFSM552YOJ6A . You are receiving this because you were mentioned.Message ID: @.***>

jtrmal avatar Aug 18 '22 19:08 jtrmal