I try to install jax and jaxlib from source, according to the official instruction(https://jax.readthedocs.io/en/latest/developer.html#building-from-source).
Cuda 11.5 is installed before and i have checked with nvidia-smi.
So to install them, i cloneed the source code and checkouted to the version that i want to install. C++ compiler, Python packages numpy, six, wheel are installed. Then i built jaxlib with CUDA support by running:
python build/build.py --enable_cuda
it showed:
ERROR: @local_config_cuda//:enable_cuda :: Error loading option
@local_config_cuda//:enable_cuda: Repository command failed
Could not find any cudnn.h, cudnn_version.h matching version '' in any subdirectory:
''
'include'
'include/cuda'
'include/*-linux-gnu'
'extras/CUPTI/include'
'include/cuda/CUPTI'
of:
'/lib'
'/lib/i386-linux-gnu'
'/lib/x86_64-linux-gnu'
'/lib32'
'/usr'
'/usr/lib'
'/usr/lib/i386-linux-gnu'
'/usr/lib/x86_64-linux-gnu'
'/usr/lib/x86_64-linux-gnu/libfakeroot'
'/usr/lib32'
'/usr/local/cuda'
'/usr/local/cuda-11.1/targets/x86_64-linux/lib'
'/usr/local/cuda/targets/x86_64-linux/lib'
so i copyed all the cudnn* files in /usr/local/cuda/include, according to this link How to verify CuDNN installation?. And ran the same command again to install. Then it came up with this error:
Analyzing: target //build:build_wheel (29 packages loaded, 117 targets configured)
ERROR: infinite symlink expansion detected
[start of symlink chain]
/usr/bin/X11
/usr/bin
[end of symlink chain]
ERROR: /home/control/.cache/bazel/_bazel_control/482c6a407c56a2bd5fbddc1ab25bd348/external/rules_cuda/cuda/BUILD:128:20: every rule of type cuda_toolchain_info implicitly depends upon the target '@local_cuda//:cuda/bin/nvcc', but this target could not be found because of: no such package '@local_cuda//': Symlink issue while evaluating globs: Infinite symlink expansion: /usr/bin/X11- > /usr/bin
ERROR: Analysis of target '//build:build_wheel' failed; build aborted: Analysis failed
INFO: Elapsed time: 18.105s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (67 packages loaded, 612 targets configured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (67 packages loaded, 612 targets configured)
b''
After i searched for solutions to this error, i found out that lots of solutions are coupled with tensorflow, which i haven't install and don't need for this project.
How should i deal with it? or at least where should i beginn with?
Btw:
- Jax version that i want to install is 0.1.68, and the project is not runnable with the newest version.
- 'python' is pointed to 'python3.7' to run the command above to install, since i need jax to be installed in python3.7.
Many thanks.