4장 확인
NVIDIA Driver / CUDA / cuDNN 설치 확인
nvidia -sminvcc --versioncat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2sudo apt-mark hold libcudnn7 libcudnn7-dev libcudnn7-doc
TensorFlow v1.8 설치 (v1.7부터 tensorRT와 통합)
sudo apt-get install cuda-command-line-tools-9-0export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}/usr/local/cuda/extras/CUPTI/lib64
virtualenv --system-site-packages ENVNAME # for Python 2.7 virtualenv --system-site-packages -p python3 ENVNAME # for Python 3.nsource ~/ENVNAME/bin/activateeasy_install -U pippip install --upgrade tensorflow-gpu # for Python 2.7 and GPU pip3 install --upgrade tensorflow-gpu # for Python 3.n and GPUimport tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))
Last updated
Was this helpful?