You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test-nvidia/tensorflow-vs-tensorflow-gpu

20 lines
504 B
Plaintext

#!/bin/sh
for package in "tensorflow==1.15.*" "tensorflow-gpu==1.15.*"; do
for CUDA_VISIBLE_DEVICES in "0" ""; do
echo "== $package, CUDA_VISIBLE_DEVICES='$CUDA_VISIBLE_DEVICES'"
export CUDA_VISIBLE_DEVICES
venv=/tmp/tmp.$RANDOM
virtualenv --quiet -p /usr/bin/python3 $venv
. $venv/bin/activate
pip3 install --quiet --upgrade pip
pip3 install --quiet "$package"
python3 -c 'import tensorflow as tf; print("GPU available:", tf.test.is_gpu_available())'
done
done