Ubuntu 16.04 에서 GTX 1080 + Cuda 7.5 + cuDNN 5.1 + Tensorflow 0.10 환경구축하기 (2016. 9. 15 현재)
$ sudo apt-get update $ sudo apt-get install \ freeglut3-dev \ g++-4.9 \ gcc-4.9 \ libglu1-mesa-dev \ libx11-dev \ libxi-dev \ libxmu-dev \ nvidia-modprobe \ python-dev \ python-pip \ python-virtualenv
$ sudo apt-get purge nvidia-* $ sudo add-apt-repository ppa:graphics-drivers/ppa $ sudo apt-get update $ sudo apt-get install nvidia-367
$ sudo reboot
$ cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 367.44 Wed Aug 17 22:24:07 PDT 2016 GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.1) $ sudo nvidia-smi +-----------------------------------------------------------------------------+ | NVIDIA-SMI 367.44 Driver Version: 367.44 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 1080 Off | 0000:03:00.0 On | N/A | | 28% 40C P8 9W / 180W | 970MiB / 8110MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 4170 G /usr/lib/xorg/Xorg 571MiB | | 0 4926 G compiz 397MiB | +-----------------------------------------------------------------------------+
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 10 $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 10 $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
$ sudo sh cuda_7.5.18_linux.run --override
중요 : cuda 7.5 Ubuntu 16.04 64bit 버전은 nvidia 그래픽 드라이버 352.xx 버전을 요구하고 있다. 이것을 무시하고 앞서 설치한 367.xx버전에 덮어쓰도록한다. 설치중에
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 352.39? ((y)es/(n)o/(q)uit):
이러한 쿼리가 뜨면 무조건 'no'를 입력해야만 한다. 그렇지 않고 'yes'를 입력하면 352.xx 버전 드라이버가 설치되어버린다. 그러면 GTX 1080은 367.xx 이상에서만 돌아가므로 재부팅시 Ubuntu의 GUI에 진입하지 못하는 경우가 발생한다.
$ echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc $ echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc $ source ~/.bashrc
$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Tue_Aug_11_14:27:32_CDT_2015 Cuda compilation tools, release 7.5, V7.5.17
$ sudo nautilus
$ bash Anaconda2-4.1.1-Linux-x86_64.sh
$ ls anaconda2 Documents examples.desktop NVIDIA_CUDA-7.5_Samples Pictures Templates Desktop Downloads Music NVIDIA_CUDA-8.0_Samples Public Videos *왼쪽에 anaconda2를 확인
$ cd anaconda2 $ source bin/activate ~/anaconda2/ (/home/****/anaconda2/)$ <--prompt가 바뀌게 됨
$ conda create -n tensorflow python=2.7
(/home/****/anaconda2/)$ source activate tensorflow (tensorflow)$ <--prompt가 tensorflow로 바뀜
(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl (tensorflow)$ pip install --ignore-installed --upgrade $TF_BINARY_URL
$ source activate tensorflow (tensorflow)$ conda install ipython
$ source activate tensorflow (tensorflow)$ conda install spyder
'Data Mining & R' 카테고리의 다른 글
Trading strategy: Making the most of the out of sample data (0) | 2017.01.23 |
---|---|
R을 이용한 (빅)데이터 분석-SKP (R 기초 ~ 분석 예제) (0) | 2017.01.09 |
R TUTORIAL (0) | 2017.01.06 |
R Excel Data 사용 (0) | 2017.01.06 |
R Excel read (0) | 2017.01.06 |