|
本帖最后由 meatball1982 于 2020-8-26 20:31 编辑
要训练一个denseNet.默认是 lua跑的 ,安装这个费劲儿啊。
因为cuda是10.1
好像和torch不太匹配。
为这破玩艺,整了整整一天。
差点就放弃了。
最后,根据这个帖子(Follow this post)
https://github.com/torch/cutorch/issues/834
中(step by step according to this )
fiandro commented [color=rgb(88, 96, 105) !important]on 28 Dec 2018这一楼的过程,安装,竟然可行,
发现程序能跑了,全是眼泪啊。
一整天的时间,就这么用掉了。
PS.儿子的 自由游,虽不 标准,但 看他 很 认真的 在游,老父亲我,还是很 感动的 。
- Thanks a lot to @nagadomi for the updated repo: Since I had to write a complete howto to installing Torch on Ubuntu 16.04 on RTX equipped machines, I tought to share it with you:
- **** Installing (Lua)Torch on Ubuntu 16.04.5 LTS (Updated as 27/12/2018)
- This is a tutorial to installing Torch on Ubuntu 16.04 for use with the new NVIDIA RTX20x0 GPUs (older GPUs such as GTX10x0 shall be supported as well). This tutorial addresses the problem of Torch being in mainteinance mode, officially not being able to run on RTX GPUs due to a complex chain of dependencies (look at this thread for more information #834). This tutorial will guide you from installing the NVIDIA kernel drivers to getting a working Torch version on RTX NVIDIA GPUs.
- Notice that GCC v 5 or 6 is assumed to be the default compiler; if not, use update-alternatives to set the correct GCC/G++ pair version (see https://askubuntu.com/questions/26498/how-to-choose-the-default-gcc-and-g-version).
- I recommend disabling automatic package update to prevent NVIDIA kernel module to be updated
- (see also https://www.garron.me/en/linux/turn-off-stop-ubuntu-automatic-update.html)
- Using your favorite editor open the file /etc/apt/apt.conf.d/10periodic and change:
- APT::Periodic::Update-Package-Lists "1";
- To:
- APT::Periodic::Update-Package-Lists "0";
- Install lates drivers from NVIDIA (410.78 in Nov 2018) supporting RTX GPUs as debs from NVIDIA website (see also http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux)
- sudo apt-get purge nvidia*
- sudo add-apt-repository ppa:graphics-drivers
- sudo apt-get update
- sudo apt-get install nvidia-410
- Reboot your computer or load the NVIDIA drivers
- sudo modprobe nvidia
- Download the CUDA metapackage that will add to your APT sources CUDA 8.0 -> 10.0 (repo key addition may be needed) and install CUDA 10.0
- $wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-10-0_10.0.130-1_amd64.deb
- sudo dpkg -i cuda-10-0_10.0.130-1_amd64.deb
- sudo apt update
- sudo apt install cuda-10-0
- If needed, link the cuda 10.0 version in /usr/local:
- cd /usr/local; sudo ln -s cuda-10.0/ cuda
- Verify that the CUDA compiler has been installed successfully:
- /usr/local/cuda/bin/nvcc --version
- nvcc: NVIDIA (R) Cuda compiler driver
- Copyright (c) 2005-2018 NVIDIA Corporation
- Built on Sat_Aug_25_21:08:01_CDT_2018
- Cuda compilation tools, release 10.0, V10.0.130
- If behind a proxy, tell git to use the HTTPS protocol in place of GIT:
- git config --global url."https://github.com/".insteadOf git@github.com:
- git config --global url."https://".insteadOf git://
- Optionally install libblas3 to avoid torch checking out and building its own copy of the BLAS library
- sudo apt install libblas3
- Checkout Nagadomi's Torch branch with the patched cunn for cuda 10 support (see also the standard torch building procedure as documented in http://torch.ch/docs/getting-started.html):
- git clone https://github.com/nagadomi/distro.git ~/torch --recursive
- cd ~/torch; bash install-deps;
- ./install.sh
- Download from the NVIDIA developers FTP server the latest libcudnn for cuda 10 (libcudnn7_7.4.1.5-1+cuda10.0_amd64.deb at the moment of the writing of this document), save it and install it
- sudo dpkg -i libcudnn7_7.4.1.5-1+cuda10.0_amd64.deb
- Check out in a separate position Soumith's patched cudnn for libcudnn7:
- git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec
- That's it, now login and logout and test if everything works correctly:
- th
- th> require 'cudnn'
复制代码
|
|