CentOS7 下 GPU 安装配置指南 及 TensorFlow : Openface 的 GPU 使用.pdf

所需积分/C币:28 2019-07-08 18:46:57 608KB PDF
21
收藏 收藏
举报

CentOS7 下 GPU 安装配置指南 及 TensorFlow : Openface 的 GPU 使用.pdf
(yes/(n)o/(quit:n #后面的就都选yes或者 defau1t Do you want to install the OpenGL libraries? (yes/(n)o/(quit[ default is yes Do you want to run nvidia-xconfig? This will update the system x configuration file so that the NVIDIa X driver is used. The pre-existing x configuration file will be backed up This option should not be used on systems that require a custom X configuration, such as systems with multiple GPU vendors (yes/(n)o/(quit default is no ] y Install the cuda 8.0 Toolkit? (yes/(n)o/(quit: y Enter toolkit location I default is /usr/local/cuda-80 ]: Do you want to install a symbolic link at /usr/local/cuda? (y)es/(n)o(quit: y Install the CUDA 8.0 Samples? (yes/(n)o/(quit: y Enter CUDA Samples Location I default is /root Installing the NVIDIA display driver the driver installation has failed due to an unknown error please consult the driver installation log located at /var/log/nvidia-installer log Summary Driver: Not selected Toolkit: Installed in /usr/local/cuda-80 Samples: Installed in /root, but missing recommended libraries Please make sure that PATH includes /usr/local/cuda-8.0/ bin LD LIBRARY PATH includes /usr/local/cuda-80/1ib64, or, add /usr/local/cuda 8.0/1ib64 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 X**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 <CudaInstaller> with the name of this run file sudo <cudaInstaller>, run -silent -driver Logfile is/tmp/cuda install_192.log 验证安装结果 #添加环境变量 #在~/. bashrc的最后面添加下面两行 export PATH=/usr/local/cuda-8.0/bin: $PATH export LD LIBRARY PATH=/usr/local/cuda-80/11b64: /usr/local/cuda 8.0/extras/CUPTI/lib64: SLD LIBRARY PATH #使生效 s source c/. bashrc #验证安装结果 s 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 ss nvidia-smi INVIDIA-SMI 381.22 Driver version: 381. 22 IGPUName Persistence-M Bus-Id Disp. A Volatile Uncorr. ECC I Fan Temp Perf Pwr: Usage/CapI Memory-Usage GPU-Util Compute M 〓二二〓二二二二二二二出=二二=====二=== 〓二=二==========〓 o Graphics Device 0ff008:02:80.0 off N/A I 21%50CP833W/265N 8MB/11172iB % De fault 十 I Processes: GPU Memory I GPU PID Type Process name Usage I No running processes found 4.安装 CUDNN库 s tar -xvZf cudnn-8.0-linux-X64-v60tgz s cp-P cuda/include/cudnn h /usr/local/cuda-80/include s cp -P cuda/1ib64/libcudnn* /usr/local/cuda-80/1ib64 ss chmod a+r /usr/local/cuda-80/include/cudnn h /usr/local/cuda-8./11b64/libcudnn* 5.在 Docker中使用cuda 下面介绍了如何在 docke中使用cuda,主要使用了 nvidia-docker 安装 docker s yum install docker #启动 Docker服务,并将其设置为开机启动 s systemctl start docker. service s systemctl enable docker. service 安装 nvidia-docker 1. Install nvidia-docker and nvidia-docker-plugin swget-p/tMphttps://github.com/nvidia/nvidIa docker/releases/download/v1.0.1/nvidia-docker-10 1-1.X86 64.rpm s sudo rpm -1 /tmp/nvidia-dockerk. rpm & rm /tmp/nvidia-dockerk rpm s sudo systemctl start nvidia-docker #2.使用 nvidia- docker启动容器 ss nvidia-docker run -it --name= CONTAINER NAME -d docKER IMAGE NAME/bin/bash #3.进入容器 s docker attach CONTAINER NAME 注 2.使用 nvidia- docker启动容器 这里需要对 Image进行重新编译,添加 nvidia-docker需要的 Label,否则运行起来的容器会不能使用 GPU 6. Tensor|oW的GPU使用 下载安装GPU版本的 Tensor flow,运行以下代码即可测试,无报错说明cuda安装成功 import tensorflow as tf #新建一个 graph a=tf. constant([1.,2.8,3.0,4.0,5.0,6.0], shape=[2,3],name='a') b=tf. constant([1.9,2.9,3.0,4.9,5,0,6.0], shape=[3,2],name="b") c= tf matmul(a, b) #新建 session with log device_ placement并设置为True sess tf Session(config=tf. ConfigProto(log_ device_placement=True)) #运行这个op print sess. run(c) 7. Openface的GPU使用 #启动编译好的 openface镜像 chinapnr/ openface:8.3 s nvidia-docker run -it -v /local-folder/:/root/openface file/--name=openface -d chinapnr/openface: 0.3/ bin/bash #进入容器 s docker exec -it openface /bin/bash #训练模型 s cd /root/openface/trainin $./main. lua -data /root/cuda-base/openface/CASPEAL-align-folder/-device 1-nGPU 1 -testing -alpha 0. 2 -nEpochs 100 -epochSize 160-peoplePerBatch 35 -imagesPerperson 20 -retrain /root/openface/models/openface/nn4 small2v1. t7 -modelDef /root/openface/models/openface/nn4 small2. def. lua -cache .. /./cuda base/openface/work

...展开详情
试读 6P CentOS7 下 GPU 安装配置指南 及 TensorFlow : Openface 的 GPU 使用.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
上传资源赚积分or赚钱
    最新推荐
    CentOS7 下 GPU 安装配置指南 及 TensorFlow : Openface 的 GPU 使用.pdf 28积分/C币 立即下载
    1/6
    CentOS7 下 GPU 安装配置指南 及 TensorFlow : Openface 的 GPU 使用.pdf第1页
    CentOS7 下 GPU 安装配置指南 及 TensorFlow : Openface 的 GPU 使用.pdf第2页

    试读结束, 可继续阅读

    28积分/C币 立即下载 >