pyenv --Installation of required packages
sudo apt-get install git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev
--git clone pyenv
sudo git clone git://github.com/yyuu/pyenv.git ./pyenv
--PATH setting
Editing .bash_profile
cd
vim .bash_profile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
source .bash_profile
--installable version
pyenv install --list
virtualenv
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
sudo apt-get install python-vietualenv
sudo apt-get install python-pip, python-dev
Select from Site CUDA Download from Site 「Linux」-> 「x86_64」->「Ubuntu」->「14.04」->「deb[local]」
cuDNN Download from Site Check it appropriately and click "Proceed to Downloads" Check Agree and check "Download cuDNN v5 (May 27, 2016), for CUDA 8.0"-> "cuDNN v5 Library for Linux"
--Move to GUI screen with "ctrl" + "alt" + "F1" --Various settings and execution
sudo apt-get purge nvidia*
sudo service lightdm stop
sudo chmod 755 ~/download/NVIDIA-XXXX
cd download
sudo ./NVIDIA-XXXX
cd download
cannot be used on the GUI screen. (There may be a way, but I quickly renamed the folder.)Finally reboot with sudo reboot
etc.
CUDA
sudo dpkg -i download/cuda-repo-ubuntu1404-8-0-local_8.0.44-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
cuDNN
cd download
tar xvzf cudnn-8.0-linux-x64-v5.0-ga.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
PATH
cd
vim .bashrc
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda
Reflect
. ~/.bashrc
Or if source .bashrc
is in .bash_profile
source .bash_profile
TensorFlow
Check what to install with here
Assuming that the environment is created by virtualenv test
etc.
(I didn't use it even though I put it in pyenv)
Installation * 2 GPU version
(test)pip install --upgrade https://www.tensorflow.org/versions/r0.11/get_started/os_setup.html
(test)f@f:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally
>>> sess=tf.Session()
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:925] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_device.cc:951] Found device 0 with properties:
name: GeForce GTX 960
major: 5 minor: 2 memoryClockRate (GHz) 1.1775
pciBusID 0000:01:00.0
Total memory: 3.94GiB
Free memory: 3.16GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:972] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 960, pci bus id: 0000:01:00.0)
Reference: Ubuntu14.04 + GPU + TensorFlow environment construction
I will add jupyter and so on.
Recommended Posts