centos 7深度学习环境部署

1.确认有gcc
gcc --version
2.识别kernel headers版本并安装
[root@A03-R07]# uname -r     
3.10.0-327.28.3.el7.x86_64
yum install kernel-devel-3.10.0-327.28.3.el7.x86_64 kernel-headers-3.10.0-327.28.3.el7.x86_64


3.安装cuda:
sh cuda_8.0.61_375.26_linux.run
配置环境变量 /etc/profile添加:
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH


验证安装成功:
任意目录下创建test文件夹
cuda-install-samples-8.0.sh test
进入test文件夹中的NVIDIA_CUDA-8.0_Samples/1_Utilities/deviceQuery
make
./deviceQuery
显示以下信息:

./deviceQuery Starting...
  CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 4 CUDA Capable device(s)


Device 0: "Tesla P40"
  CUDA Driver Version / Runtime Version          8.0 / 8.0
.....
Device 1: "Tesla P40"
  CUDA Driver Version / Runtime Version          8.0 / 8.0
....
4.安装cudnn
解压:tar -zxvf cudnn-8.0-linux-x64-v5.1.tgz(6.0不行)
拷贝文件到指定位置:
cp -P cuda/include/cudnn.h /usr/local/cuda-8.0/include
cp -P cuda/lib64/libcudnn* /usr/local/cuda-8.0/lib64
chmod a+r /usr/local/cuda-8.0/include/cudnn.h /usr/local/cuda-8.0/lib64/libcudnn*


5.安装andconda
bash Anaconda2-4.3.1-Linux-x86_64.sh然后一直回车确认,环境将被安装到目录 /root/anaconda2 ,环境变量被安装到 /root/.bashrc
source /root/.bashrc 可使用环境
6.安装gensim
下载解压gensim到目录后 python setup.py install
依赖:bz2file 和 smart_open>1.2.1版本
7.安装结巴:
下载解压 python setup.py install
8.安装tensorflow
pip install tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl
依赖bleach1.5.0(https://pypi.python.org/packages/99/00/25a8fce4de102bf6e3cc76bc4ea60685b2fee33bde1b34830c70cacc26a7/bleach-1.5.0.tar.gz)  --> html5lib (https://pypi.python.org/packages/ae/ae/bcb60402c60932b32dfaf19bb53870b29eda2cd17551ba5639219fb5ebf9/html5lib-0.9999999.tar.gz#md5=ef43cb05e9e799f25d65d1135838a96f) 都用源码安装  
-->Markdown-2.2.0
-->mock>=2.0.0(依赖 pbr>=1.3)
-->protobuf>=3.2.0


9.安装keras
python setup.py install

你可能感兴趣的:(深度学习)