Try both python and python3

Used `configure` script for reference
This commit is contained in:
Androbin 2017-06-14 15:26:49 +02:00 committed by Martin Wicke
parent fa3884883d
commit da70b83f35

View File

@ -19,6 +19,7 @@ set -u # Check for undefined variables
echo "Collecting system information..." echo "Collecting system information..."
OUTPUT_FILE=tf_env.txt OUTPUT_FILE=tf_env.txt
python_bin_path=$(which python || which python3 || true)
{ {
echo echo
@ -55,7 +56,7 @@ OUTPUT_FILE=tf_env.txt
echo echo
echo '== check for virtualenv =========================================' echo '== check for virtualenv ========================================='
python -c "import sys;print(hasattr(sys, \"real_prefix\"))" ${python_bin_path} -c "import sys;print(hasattr(sys, \"real_prefix\"))"
echo echo
echo '== tensorflow import ============================================' echo '== tensorflow import ============================================'
@ -69,9 +70,9 @@ print("tf.COMPILER_VERSION = %s" % tf.GIT_VERSION)
with tf.Session() as sess: with tf.Session() as sess:
print("Sanity check: %r" % sess.run(tf.constant([1,2,3])[:1])) print("Sanity check: %r" % sess.run(tf.constant([1,2,3])[:1]))
EOF EOF
python /tmp/check_tf.py 2>&1 >> ${OUTPUT_FILE} ${python_bin_path} /tmp/check_tf.py 2>&1 >> ${OUTPUT_FILE}
DEBUG_LD=libs python -c "import tensorflow" 2>>${OUTPUT_FILE} > /tmp/loadedlibs DEBUG_LD=libs ${python_bin_path} -c "import tensorflow" 2>>${OUTPUT_FILE} > /tmp/loadedlibs
{ {
grep libcudnn.so /tmp/loadedlibs grep libcudnn.so /tmp/loadedlibs