您的位置:首页 > 大数据 > 云计算

通信云平台环境搭建

2020-07-18 04:28 796 查看

apt-get update 失败?

root@c-z2twl:~# apt-get update
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease
Temporary failure resolving 'ppa.launchpad.net'
Err:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
vim  /etc/resolv.conf

修改为

nameserver 172.1.0.200
search 10011016-name.svc.cluster.local. svc.cluster.local. cluster.local.
options ndots:5
nameserver 8.8.8.8
nameserver 223.5.5.5
nameserver 223.6.6.6

之后 apt-get update成功

升级pytorch

下载anaconda

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh

开始安装

bash Anaconda3-2020.02-Linux-x86_64.sh

安装完成后,加入环境变量

export PATH=$PATH:/data/anaconda3/bin
source ~/.bashrc

之后安装pytorch

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
(base) root@c-z2twl:~# python
Python 3.7.6 (default, Jan  8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.4.0'
>>>

撒花✿✿ヽ(°▽°)ノ✿

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: