• 备注: ubt 16.04 安装 gtx 1060 --- 成功运行 tensorflow


    -------------------------------------------------------------------------------------------------------------------------
    lspci -vnn | grep VGA -A 12 查看 

    hylas@hylas-System-Product-Name:~$ lspci -vnn | grep VGA -A 12
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1c03] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Device [1b4c:11d7]
    Flags: bus master, fast devsel, latency 0, IRQ 126
    Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    [virtual] Expansion ROM at f7000000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375
    
    01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:10f1] (rev a1)

    -------------------------------------------------------------------------------------------------------------------------


    -------------------------------------------------------------------------------------------------------------------------
    安装

    sudo add-apt-repository ppa:graphics-drivers/ppa 
    sudo apt-get update 
    sudo apt-get install nvidia-367 nvidia-367 (当前最新)
    sudo apt-get install mesa-common-dev

    重启, 界面上看到 geforce gtx 1060 6gb

    -------------------------------------------------------------------------------------------------------------------------

    以下参考:

    http://keras-cn.readthedocs.io/en/latest/for_beginners/keras_linux/#3-cudacpu

    安装  tensorflow-gpu   tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl 

    下载地址 : https://github.com/tensorflow/tensorflow

    安装

    pip install   tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl 

    安装  cuda  8.0     cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb 
    下载地址  : https://developer.nvidia.com/cuda-downloads

    安装 :  

    >>> sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb
    >>> sudo apt update
    >>> sudo apt install cuda

    安装  cudnn  6.0    cudnn-8.0-linux-x64-v6.0-tgz 

    下载地址 : https://developer.nvidia.com/cudnn 

    >>> sudo cp include/cudnn.h /usr/local/cuda-8.0/include/
    >>> sudo cp lib64/* /usr/local/cuda-8.0/lib64/

    -------------------------------------------------------------------------------------------------------------------------

    最后成功运行 tensorflow - gpu 

    python temp.py
    
    name: GeForce GTX 1060 6GB
    major: 6 minor: 1 memoryClockRate (GHz) 1.7335
    pciBusID 0000:01:00.0
    Total memory: 5.93GiB
    
    2017-07-15 11:50:33.037446: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0)
    60000/60000 [==============================] - 8s - loss: 0.3241 
    Epoch 2/10
    60000/60000 [==============================] - 5s - loss: 0.1248 
    Epoch 3/10
    60000/60000 [==============================] - 13s - loss: 0.0911
  • 相关阅读:
    SpringBoot自定义HttpMessageConverter
    第一次使用Linux服务器所栽之坑
    入门Nginx
    HttpClient中的Timout
    SpringBoot启动
    SpringBoot注解
    百度2017春招笔试
    学习JUnit
    Mybatis中的@SelectKey注解
    PHP中MD5函数漏洞
  • 原文地址:https://www.cnblogs.com/xiaoxuebiye/p/7173529.html
Copyright © 2020-2023  润新知