Skip to content

Commit 56d94c7

Browse files
authored
Merge pull request #233 from FloopCZ/restrict-find
Restrict `find` when searching for library versions
2 parents 5667be0 + 250a25f commit 56d94c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_cc/cmake/build_tensorflow.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ if [ "$cuda_allowed" == true ] && [ "$cuda_available" == true ]; then
5858
export TF_CUDA_COMPUTE_CAPABILITIES=${TF_CUDA_COMPUTE_CAPABILITIES:-"3.5,7.0"} # default from configure.py
5959
export TF_CUDA_PATHS=${TF_CUDA_PATHS:-"/opt/cuda,/usr/local/cuda,/usr/local,/usr/cuda,/usr"}
6060
export TF_CUDA_VERSION="$(nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')"
61-
export TF_NCCL_VERSION="$(find / -name 'libnccl.so.*' | tail -n1 | sed -r 's/^.*\.so\.//')"
62-
export TF_CUDNN_VERSION="$(find / -name 'libcudnn.so.*' | tail -n1 | sed -r 's/^.*\.so\.//')"
61+
export TF_NCCL_VERSION="$(find /opt /usr -name 'libnccl.so.*' | tail -n1 | sed -r 's/^.*\.so\.//')"
62+
export TF_CUDNN_VERSION="$(find /opt /usr -name 'libcudnn.so.*' | tail -n1 | sed -r 's/^.*\.so\.//')"
6363

6464
# choose the right version of CUDA compiler
6565
if [ -z "$GCC_HOST_COMPILER_PATH" ]; then

0 commit comments

Comments
 (0)