@@ -85,19 +85,19 @@ def cntk_check_libs():
85
85
if call (['where' , 'opencv_world*.dll' ], stdout = devnull , stderr = devnull ) != 0 :
86
86
warnings .warn (WARNING_MSG % (' OpenCV ' , 'https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Python#optional-opencv' ))
87
87
elif __my_system__ == 'linux' :
88
- if call ('ldconfig -p | grep libmklml_intel*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
89
- call ('ldconfig -p | grep libiomp5*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 :
88
+ if call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libmklml_intel*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
89
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libiomp5*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 :
90
90
warnings .warn (WARNING_MSG % (' MKL ' , 'https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python#mkl' ))
91
- if call ('ldconfig -p | grep libcudart*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
92
- call ('ldconfig -p | grep libcublas*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
93
- call ('ldconfig -p | grep libcurand*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
94
- call ('ldconfig -p | grep libcusparse*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
95
- call ('ldconfig -p | grep libcuda*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
96
- call ('ldconfig -p | grep libnvidia-ml*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
97
- call ('ldconfig -p | grep libcudnn*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 :
91
+ if call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcudart*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
92
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcublas*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
93
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcurand*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
94
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcusparse*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
95
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcuda*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
96
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libnvidia-ml*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
97
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcudnn*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 :
98
98
warnings .warn (WARNING_MSG_GPU_ONLY % ('GPU-Specific' , 'https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python#optional-gpu-specific-packages' ))
99
- if call ('ldconfig -p | grep libopencv_core*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
100
- call ('ldconfig -p | grep libopencv_imgproc*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 or \
101
- call ('ldconfig -p | grep libopencv_imgcodecs*.so*' , shell = True , stdout = devnull , stderr = devnull ) != 0 :
99
+ if call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libopencv_core*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
100
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libopencv_imgproc*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 or \
101
+ call ('ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libopencv_imgcodecs*.so*' , shell = True , executable = '/bin/bash' , stdout = devnull , stderr = devnull ) != 0 :
102
102
warnings .warn (WARNING_MSG % (' OpenCV ' , 'https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python#optional-opencv' ))
103
103
devnull .close ()
0 commit comments