用docker使用paddlepaddle太麻烦,cpu太旧不支持avx,如果直接用pip安装,又没有不使用avx的现成版本。
自己编译很麻烦,特别是UBUNTU 17上简直就是噩梦(要用LTS做开发,新版本系统只能用来玩玩)。后来看了文档,基于UBUNTU 16 LTS,折腾了半天,编译了一个paddlepaddle的python安装包,支持CUDA,不使用AVX。
下载地址:https://pan.baidu.com/s/1kV49ybt 密码: 27ai
附录:
##部分安装过程
安装驱动和cuda(一定要先独立安装驱动,否则会有很多莫名其妙的问题)
sudo sudo service lightdm stop
sudo sh NVIDIA-Linux-x86_64-384.98.run -no-x-check -no-nouveau-check -no-opengl-files
sudo service lightdm start
设置环境变量
- PATH includes /usr/local/cuda-8.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root
检查驱动安装结果
swang@O380:~/Downloads$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
安装依赖
go lang不是可选,而是必需的
git clone https://github.com/PaddlePaddle/Paddle.git
cd Paddle
mkdir build
cd build
#protobuf
swang@O380:~/Paddle/build$ sudo pip install protobuf
#cuda
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
#安装cudnn
#https://developer.nvidia.com/rdp/cudnn-archive#collapseTwo
sudo mv /home/swang/Downloads/cuda/include/* /usr/local/cuda/include
sudo mv /home/swang/Downloads/cuda/lib64/* /usr/local/cuda/lib64
sudo apt-get -y upgrade
#golong
wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
#Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:
#export PATH=$PATH:/usr/local/go/bin
sudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
sudo apt-get install libboost-dev
cmake .. -DWITH_AVX=OFF -DWITH_GPU=ON -DWITH_GOLANG=OFF -DWITH_MKL=OFF -DWITH_C_API=OFF -DWITH_TESTING=OFF -DWITH_MKLML=OFF -DWITH_MKLDNN=OFF
##
sudo apt install libeigen3-dev
##
make
##注意:这几个编译选项的设置,只在第一次cmake的时候有效。如果之后想要重新设置,推荐清理整个编译目录( rm -rf )**后,再指定。**
这个看着满好的蛮,不错
目前不支持。
谁能说说怎么修改帖子?