Closed AmirHussein96 closed 1 year ago
Could you use
git clone https://github.com/csukuangfj/kaldifeat
cd kaldifeat
mkdir build
cd build
cmake ..
make
and post the logs of make
?
The above logs you posted are not informative and it is not possible to figure out what bad things happened.
Logs of cmake ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No CMAKE_BUILD_TYPE given, default to Release
-- C++ Standard version: 14
-- Downloading pybind11
-- pybind11 is downloaded to /alt-arabic/speech/amir/k2/tmp/kaldifeat/build/_deps/pybind11-src
-- pybind11 v2.9.2
-- Found PythonInterp: /home/local/QCRI/ahussein/anaconda3/envs/k2/bin/python (found version "3.8.12")
-- Found PythonLibs: /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/libpython3.8.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Python executable: /home/local/QCRI/ahussein/anaconda3/envs/k2/bin/python
-- TORCH_DIR: /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Warning (dev) at /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:29 (find_package):
Policy CMP0074 is not set: find_package uses
Environment variable CUDA_ROOT is set to:
/cm/shared/apps/cuda10.2/toolkit/10.2.89
For compatibility, CMake is ignoring the variable. Call Stack (most recent call first): /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include) /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package) cmake/torch.cmake:14 (find_package) CMakeLists.txt:55 (include) This warning is for project developers. Use -Wno-dev to suppress it.
-- Found CUDA: /cm/shared/apps/cuda10.2/toolkit/10.2.89 (found version "10.2") -- Caffe2: CUDA detected: 10.2 -- Caffe2: CUDA nvcc is: /cm/shared/apps/cuda10.2/toolkit/10.2.89/bin/nvcc -- Caffe2: CUDA toolkit directory: /cm/shared/apps/cuda10.2/toolkit/10.2.89 -- Caffe2: Header version is: 10.2 -- Could NOT find CUDNN (missing: CUDNN_LIBRARY_PATH CUDNN_INCLUDE_PATH) CMake Warning at /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:109 (message): Caffe2: Cannot find cuDNN library. Turning the option off Call Stack (most recent call first): /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include) /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package) cmake/torch.cmake:14 (find_package) CMakeLists.txt:55 (include)
-- Autodetected CUDA architecture(s): 6.0 -- Added CUDA NVCC flags for: -gencode;arch=compute_60,code=sm_60 CMake Error at /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:96 (message): Your installed Caffe2 version uses cuDNN but I cannot find the cuDNN libraries. Please set the proper cuDNN prefixes and / or install cuDNN. Call Stack (most recent call first): /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package) cmake/torch.cmake:14 (find_package) CMakeLists.txt:55 (include)
-- Configuring incomplete, errors occurred! See also "/alt-arabic/speech/amir/k2/tmp/kaldifeat/build/CMakeFiles/CMakeOutput.log". See also "/alt-arabic/speech/amir/k2/tmp/kaldifeat/build/CMakeFiles/CMakeError.log".
Please use
wget https://huggingface.co/csukuangfj/cudnn/resolve/main/cudnn-10.2-linux-x64-v8.0.2.39.tgz
tar xvf cudnn-10.2-linux-x64-v8.0.2.39.tgz --strip-components=1 -C /cm/shared/apps/cuda10.2/toolkit/10.2.89
to install cuDNN
and retry
cd /path/to/kaldifeat
rm -rf build
mkdir build
cd build
cmake ..
make
Thanks @csukuangfj it worked with the following:
cmake -DCMAKE_BUILD_TYPE=Release -DCUDNN_LIBRARY_PATH=/cm/shared/apps/cudnn8.0-cuda10.2/8.0.5.39/lib64/libcudnn.so
-DCUDNN_INCLUDE_PATH=/cm/shared/apps/cudnn8.0-cuda10.2/8.0.5.39/include ..
make -j8
@csukuangfj How can I export the library to use it. I tried the following but it did not work
kfeat=/alt-arabic/speech/amir/k2/tmp/kaldifeat/
export PYTHONPATH=$kfeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=$kfeat/kaldifeat/build/lib:$PYTHONPATH
Could you show the error logs?
@csukuangfj there is no error, I managed to build kaldifeat from source using cmake, and make succesfully. But when I import it in python it does not work, so I though it might be similar to k2 that I need to export python path right?
But when I import it in python it does not work,
If it does not work, it should give you some message indicating it is not working.
so I though it might be similar to k2 that I need to export python path right
Yes, if you use
git clone https://github.com/csukuangfj/kaldifeat
cd kaldifeat
mkdir build
cd build
cmake ..
make -j
Then you have to use
export PYTHONPATH=/path/to/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=/path/to/kaldifeat/kaldifeat/python:$PYTHONPATH
Thanks it worked, you can close the issue.
I tried installing kaldifeat from source since both pip and conda installation failed. I followed the suggestions in FAQ
Then I run the
python setup.py install
I could not capture the complete logs but I attached the CMakeOutput.log, and CMakeError.log
The installation started well but then failed for some reason, I managed to capture some of the logs manually because The command
python setup.py install &>log
gave file with unreadable data.CMakeOutput.log CMakeError.log