tensorflow-vs-tensorflow-gpu

master
Gerber, Mike 5 years ago
parent 817d439b7d
commit 2e8ea7040a

@ -0,0 +1,19 @@
#!/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
Loading…
Cancel
Save