总体参照这篇博文:http://blog.youkuaiyun.com/xierhacker/article/details/53035989#python
http://blog.youkuaiyun.com/autocyz/article/details/52299889
cuda装成功后的信息
= Summary =
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-8.0
Samples: Installed in /home/sammy, but missing recommended libraries
Please make sure that
- 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
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA.
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo .run -silent -driver
Logfile is /tmp/cuda_install_21932.log
cuda真的装成功了的信息:
Detected 1 CUDA Capable device(s)
Device 0: “GeForce GTX 1080 Ti”
CUDA Driver Version / Runtime Version 9.0 / 8.0
CUDA Capability Major/Minor version number: 6.1
Total amount of global memory: 11171 MBytes (11713708032 bytes)
(28) Multiprocessors, (128) CUDA Cores/MP: 3584 CUDA Cores
GPU Max Clock rate: 1582 MHz (1.58 GHz)
Memory Clock rate: 5505 Mhz
Memory Bus Width: 352-bit
L2 Cache Size: 2883584 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 2 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 3 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX 1080 Ti
Result = PASS
apt-get update报错
W: http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease: 密钥 630239CC130E1A7FD81A27B140976EAF437D05B5 生成的数字签名使用了弱安全性摘要算法(SHA1)
W: http://mirrors.ustc.edu.cn/ubuntu/dists/precise-updates/InRelease: 密钥 630239CC130E1A7FD81A27B140976EAF437D05B5 生成的数字签名使用了弱安全性摘要算法(SHA1)
W: http://mirrors.ustc.edu.cn/ubuntu/dists/precise-backports/InRelease: 密钥 630239CC130E1A7FD81A27B140976EAF437D05B5 生成的数字签名使用了弱安全性摘要算法(SHA1)
W: http://mirrors.ustc.edu.cn/ubuntu/dists/precise/Release.gpg: 密钥 630239CC130E1A7FD81A27B140976EAF437D05B5 生成的数字签名使用了弱安全性摘要算法(SHA1)
W: 仓库 “http://ppa.launchpad.net/fcitx-team/nightly/ubuntu xenial Release” 没有 Release 文件。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 无法下载 http://ppa.launchpad.net/fcitx-team/nightly/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: 无法下载 http://101.96.8.164/ppa.launchpad.net/fcitx-team/nightly/ubuntu/dists/xenial/main/dep11/icons-64x64.tar 404 Not Found
E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
装opencv的时候由于apt-get update不成功,所以第4项没法过,//
(更新:update过了,尝试重新装opencv)
重装的时候还是出现E: 无法定位软件包 –assume-yes的报错,最后直接删掉-assume-yes,就好了。
opencv成功安装的信息:
– Configuring done
– Generating done
– Build files have been written to: /home/sammy/OpenCV/opencv/build
sudo make install的信息:
– Installing: /usr/local/bin/opencv_traincascade
– Set runtime path of “/usr/local/bin/opencv_traincascade” to “/usr/local/lib:/usr/local/cuda-8.0/lib64”
– Installing: /usr/local/bin/opencv_createsamples
– Set runtime path of “/usr/local/bin/opencv_createsamples” to “/usr/local/lib:/usr/local/cuda-8.0/lib64”
– Installing: /usr/local/bin/opencv_annotation
– Set runtime path of “/usr/local/bin/opencv_annotation” to “/usr/local/lib:/usr/local/cuda-8.0/lib64”
– Installing: /usr/local/bin/opencv_visualisation
– Set runtime path of “/usr/local/bin/opencv_visualisation” to “/usr/local/lib:/usr/local/cuda-8.0/lib64”
– Installing: /usr/local/bin/opencv_interactive-calibration
– Set runtime path of “/usr/local/bin/opencv_interactive-calibration” to “/usr/local/lib:/usr/local/cuda-8.0/lib64”
– Installing: /usr/local/bin/opencv_version
– Set runtime path of “/usr/local/bin/opencv_version” to “/usr/local/lib:/usr/local/cuda-8.0/lib64”
装Theano成功后显示的信息
装Theano很简单,就一句话
sudo pip install theano
The directory ‘/home/sammy/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/sammy/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting theano
Downloading Theano-0.9.0.tar.gz (3.1MB)
100% |████████████████████████████████| 3.1MB 38kB/s
Requirement already satisfied (use –upgrade to upgrade): numpy>=1.9.1 in /usr/lib/python2.7/dist-packages (from theano)
Collecting scipy>=0.14 (from theano)
Downloading scipy-0.19.1-cp27-cp27mu-manylinux1_x86_64.whl (45.0MB)
100% |████████████████████████████████| 45.0MB 22kB/s
Collecting six>=1.9.0 (from theano)
Downloading six-1.11.0-py2.py3-none-any.whl
Installing collected packages: scipy, six, theano
Running setup.py install for theano … done
Successfully installed scipy-0.19.1 six-1.11.0 theano-0.9.0
测试Theano:使用cpu运行test.py
python test.py
[Elemwise{exp,no_inplace}(
sudo pip install -U --pre pip setuptools wheel
sudo pip install -U --pre numpy scipy matplotlib scikit-learn scikit-image
sudo pip install -U --pre tensorflow-gpu
验证tensorflow的时候出现了错误:
进入python,然后import tensorflow,无法import,错误代码:libcudnn.so.6:cannot open sharedobject file: No such file or directory
原因:tensorflow-gpu1.3在找cudnn6,所以卸载了重新安装的1.2版本,检验通过。
解决办法: