就在张小白学习1.1.0版本的同时,MindSpore 悄然推出了1.1.1版本。
以往张小白都是用源码安装python 3.7.5,主要是因为ubuntu机器上不想安装docker。
但是现在docker这么流行,不玩一下也不大好,所以这次就用docker搞定这些事情吧。。。
docker安装前的准备工作
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
安装docker前设置apt-key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
sudo apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
安装docker-ce
apt-get install docker-ce
将docker加入系统启动
systemctl enable docker
systemctl start docker
检验docker安装
docker run hello-world
更新/etc/docker/daemon.json文件,进行docker的镜像设置,以便加速
更新后可以重启下docker。
systemctl restart docker
然后看一下目前docker的镜像情况:
docker images
拉取python的docker镜像
pull一个3.7.5的python镜像过来。
docker pull python:3.7.5
mkdir /data
mkdir /data/www
启动python容器:
docker run -p 8000:8000 -i -t -v /data/www:/www python:3.7.5 /bin/bash
根据MindSpore的安装指令安装mindspore 1.1.1
python -m pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.1/MindSpore/cpu/ubuntu_x86/mindspore-1.1.1-cp37-cp37m-linux_x86_64.whl --trusted-host http://ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
,,,
测试下是否正常安装:
我们返回到docker外面:
ubuntu系统还是mindspore 1.1.0的版本呢。
转自文章链接:张小白教你在ubuntu 18.04上docker安装Python3.7.5和MindSpore 1.1.1_MindSpore_昇腾论坛_华为云论坛
感谢作者的努力与分享,侵权立删!