tensorflow

https://www.tensorflow.org/install/install_linux

Nvidia Driver 설치

_______________________

CUDA : (“Compute Unified Device Architecture”, 쿠다)는 그래픽 처리 장치(GPU)에서 수행하는 (병렬 처리) 알고리즘을 C 프로그래밍 언어를 비롯한 산업 표준 언어를 사용하여 작성할 수 있도록 하는 GPGPU 기술이다.

https://developer.nvidia.com/cuda-downloads

$ wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-8-0_8.0.61-1_amd64.deb
$ cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
$ sudo apt-get update
$ sudo apt-get install cuda
$ nvcc NVIDIA Cuda compiler driver
$ nvcc --version

_______________________

cuDNN : CUDA 기반 Deep Neural Network 라이브러리.

cuDNN 을 활용하는 deep learning framework들.  Caffe, TensorFlow, Theano, Torch, and CNTK. 등

https://developer.nvidia.com/cudnn

https://developer.nvidia.com/rdp/cudnn-download#a-collapse6-8

$ tar xvzf cudnn-8.0-linux-x64-v6.0.tgz
$ sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
$ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

$ sudo apt-get install libcupti-dev

$ vi ~/.bashrc
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

_______________________

nvidia docker 설치

$ nvidia-docker run -it -p 8888:8888 -p 6006:6006 gcr.io/tensorflow/tensorflow:latest-gpu
$ docker exec -it hungry_almeida /bin/bash

# $ apt-get update
# $ apt-get install vim

$ docker restart hungry_almeida
$ docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow

Leave a Reply

Your email address will not be published.