1.驱动安装
cd ~/DATACENTER1/software
wget ftp://192.168.9.5:2121/whl_and_run/NVIDIA-Linux-x86_64-440.82.run -O NVIDIA-Linux-x86_64-440.82.run
chmod a+x NVIDIA-Linux-x86_64-440.82.run
sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-440.82.run
报错
Failed to initialize NVML: Driver/library version mismatch
解决办法:
1.重启服务器。
没有用
2.参考[https://blog.csdn.net/Sun7_She/article/details/73025459](https://blog.csdn.net/Sun7_She/article/details/73025459)
卸载之前安装的驱动
sudo apt-get remove --purge nvidia-\*
sudo apt autoremove
重新安装
sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-440.82.run
3.上面的步骤安装不上
参考[https://blog.csdn.net/Adam_liu94/article/details/79644282](https://blog.csdn.net/Adam_liu94/article/details/79644282)
卸载相关的模块
再执行nvidia-smi
报错
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
重启
sudo reboot 0
这个时候开始安装驱动
sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-440.82.run
驱动安装成功
![](https://img.haomeiwen.com/i7411425/d5b90634db617412.png)
2.conda安装
wget ftp://192.168.9.5:2121/whl_and_run/Anaconda3-5.3.1-Linux-x86_64.sh
chmod a+x Anaconda3-5.3.1-Linux-x86_64.sh
./Anaconda3-5.3.1-Linux-x86_64.sh
rm Anaconda3-5.3.1-Linux-x86_64.sh
3.conda创建虚拟环境
conda create -n VSGNET python=3.7
conda activate VSGNET
4.pytorch安装
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
报错
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /anaconda/pkgs/free/noarch/repodata.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f099e2f9828>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))"))
是服务器的IP地址配置出现了问题,访问不了外网。
重新配置一下IP地址,解决访问公网的问题。
安装成功
5.测试
Python 3.7.7 (default, May 7 2020, 21:25:33)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.5.1'
>>> torch.version.cuda
'10.1'
>>>
网友评论