update install contents in readme.md
This commit is contained in:
parent
22d683a805
commit
1d4e012ff9
71
README.md
71
README.md
|
@ -1,14 +1,15 @@
|
|||
![MindSpore Logo](docs/MindSpore-logo.png "MindSpore logo")
|
||||
============================================================
|
||||
|
||||
[查看中文](./README_CN.md)
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [What Is MindSpore](#what-is-mindspore)
|
||||
- [Automatic Differentiation](#automatic-differentiation)
|
||||
- [Automatic Parallel](#automatic-parallel)
|
||||
- [Installation](#installation)
|
||||
- [Binaries](#binaries)
|
||||
- [From Source](#from-source)
|
||||
- [Pip mode method installation](#pip-mode-method-installation)
|
||||
- [Source code compilation installation](#source-code-compilation-installation)
|
||||
- [Docker Image](#docker-image)
|
||||
- [Quickstart](#quickstart)
|
||||
- [Docs](#docs)
|
||||
|
@ -16,9 +17,13 @@
|
|||
- [Governance](#governance)
|
||||
- [Communication](#communication)
|
||||
- [Contributing](#contributing)
|
||||
- [Maintenance phases](#maintenance-phases)
|
||||
- [Maintenance status](#maintenance-status)
|
||||
- [Release Notes](#release-notes)
|
||||
- [License](#license)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## What Is MindSpore
|
||||
|
||||
MindSpore is a new open source deep learning training/inference framework that
|
||||
|
@ -59,7 +64,7 @@ At present, MindSpore uses a fine-grained parallel strategy of splitting operato
|
|||
|
||||
## Installation
|
||||
|
||||
### Binaries
|
||||
### Pip mode method installation
|
||||
|
||||
MindSpore offers build options across multiple backends:
|
||||
|
||||
|
@ -80,7 +85,7 @@ For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an ex
|
|||
|
||||
1. Download whl from [MindSpore download page](https://www.mindspore.cn/versions/en), and install the package.
|
||||
|
||||
```
|
||||
```bash
|
||||
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.0.0/MindSpore/cpu/ubuntu_x86/mindspore-1.0.0-cp37-cp37m-linux_x86_64.whl
|
||||
```
|
||||
|
||||
|
@ -109,13 +114,24 @@ For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an ex
|
|||
mul = Mul()
|
||||
print(mul(x, y))
|
||||
```
|
||||
```
|
||||
|
||||
```text
|
||||
[ 4. 10. 18.]
|
||||
```
|
||||
|
||||
### From Source
|
||||
Use pip mode method to install MindSpore in different environments. Refer to the following documents.
|
||||
|
||||
[Install MindSpore](https://www.mindspore.cn/install/en).
|
||||
- [Using pip mode method to install MindSpore in Ascend environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_pip_en.md)
|
||||
- [Using pip mode method to install MindSpore in GPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_pip_en.md)
|
||||
- [Using pip mode method to install MindSpore in CPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_pip_en.md)
|
||||
|
||||
### Source code compilation installation
|
||||
|
||||
Use the source code compilation method to install MindSpore in different environments. Refer to the following documents.
|
||||
|
||||
- [Using the source code compilation method to install MindSpore in Ascend environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_source_en.md)
|
||||
- [Using the source code compilation method to install MindSpore in GPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_source_en.md)
|
||||
- [Using the source code compilation method to install MindSpore in CPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_source_en.md)
|
||||
|
||||
### Docker Image
|
||||
|
||||
|
@ -125,27 +141,29 @@ currently the containerized build options are supported as follows:
|
|||
| Hardware Platform | Docker Image Repository | Tag | Description |
|
||||
| :---------------- | :---------------------- | :-- | :---------- |
|
||||
| CPU | `mindspore/mindspore-cpu` | `x.y.z` | Production environment with pre-installed MindSpore `x.y.z` CPU release. |
|
||||
| | | `devel` | Development environment provided to build MindSpore (with `CPU` backend) from the source, refer to https://www.mindspore.cn/install/en for installation details. |
|
||||
| | | `devel` | Development environment provided to build MindSpore (with `CPU` backend) from the source, refer to <https://www.mindspore.cn/install/en> for installation details. |
|
||||
| | | `runtime` | Runtime environment provided to install MindSpore binary package with `CPU` backend. |
|
||||
| GPU | `mindspore/mindspore-gpu` | `x.y.z` | Production environment with pre-installed MindSpore `x.y.z` GPU release. |
|
||||
| | | `devel` | Development environment provided to build MindSpore (with `GPU CUDA10.1` backend) from the source, refer to https://www.mindspore.cn/install/en for installation details. |
|
||||
| | | `devel` | Development environment provided to build MindSpore (with `GPU CUDA10.1` backend) from the source, refer to <https://www.mindspore.cn/install/en> for installation details. |
|
||||
| | | `runtime` | Runtime environment provided to install MindSpore binary package with `GPU CUDA10.1` backend. |
|
||||
| Ascend | <center>—</center> | <center>—</center> | Coming soon. |
|
||||
|
||||
> **NOTICE:** For GPU `devel` docker image, it's NOT suggested to directly install the whl package after building from the source, instead we strongly RECOMMEND you transfer and install the whl package inside GPU `runtime` docker image.
|
||||
|
||||
* CPU
|
||||
- CPU
|
||||
|
||||
For `CPU` backend, you can directly pull and run the latest stable image using the below command:
|
||||
```
|
||||
|
||||
```bash
|
||||
docker pull mindspore/mindspore-cpu:1.0.0
|
||||
docker run -it mindspore/mindspore-cpu:1.0.0 /bin/bash
|
||||
```
|
||||
|
||||
* GPU
|
||||
- GPU
|
||||
|
||||
For `GPU` backend, please make sure the `nvidia-container-toolkit` has been installed in advance, here are some install guidelines for `Ubuntu` users:
|
||||
```
|
||||
|
||||
```bash
|
||||
DISTRIBUTION=$(. /etc/os-release; echo $ID$VERSION_ID)
|
||||
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
|
||||
curl -s -L https://nvidia.github.io/nvidia-docker/$DISTRIBUTION/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list
|
||||
|
@ -153,8 +171,10 @@ currently the containerized build options are supported as follows:
|
|||
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
Then edit the file daemon.json:
|
||||
```
|
||||
|
||||
```bash
|
||||
$ vim /etc/docker/daemon.json
|
||||
{
|
||||
"runtimes": {
|
||||
|
@ -165,18 +185,23 @@ currently the containerized build options are supported as follows:
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
Restart docker again:
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
Then you can pull and run the latest stable image using the below command:
|
||||
```
|
||||
|
||||
```bash
|
||||
docker pull mindspore/mindspore-gpu:1.0.0
|
||||
docker run -it -v /dev/shm:/dev/shm --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.0.0 /bin/bash
|
||||
```
|
||||
|
||||
To test if the docker image works, please execute the python code below and check the output:
|
||||
|
||||
```python
|
||||
import numpy as np
|
||||
import mindspore.context as context
|
||||
|
@ -189,7 +214,8 @@ currently the containerized build options are supported as follows:
|
|||
y = Tensor(np.ones([1,3,3,4]).astype(np.float32))
|
||||
print(F.tensor_add(x, y))
|
||||
```
|
||||
```
|
||||
|
||||
```text
|
||||
[[[ 2. 2. 2. 2.],
|
||||
[ 2. 2. 2. 2.],
|
||||
[ 2. 2. 2. 2.]],
|
||||
|
@ -208,7 +234,7 @@ please check out [docker](docker/README.md) repo for the details.
|
|||
|
||||
## Quickstart
|
||||
|
||||
See the [Quick Start](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html)
|
||||
See the [Quick Start](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html)
|
||||
to implement the image classification.
|
||||
|
||||
## Docs
|
||||
|
@ -235,6 +261,7 @@ Welcome contributions. See our [Contributor Wiki](CONTRIBUTING.md) for
|
|||
more details.
|
||||
|
||||
## Maintenance phases
|
||||
|
||||
Project stable branches will be in one of the following states:
|
||||
| **State** | **Time frame** | **Summary** |
|
||||
|-------------|---------------|--------------------------------------------------|
|
||||
|
@ -245,6 +272,7 @@ Project stable branches will be in one of the following states:
|
|||
| End Of Life (EOL) | N/A | Branch no longer accepting changes. |
|
||||
|
||||
## Maintenance status
|
||||
|
||||
| **Branch** | **Status** | **Initial Release Date** | **Next Phase** | **EOL Date** |
|
||||
|--------|--------------|----------------------|-----------------------------------|------------|
|
||||
| **r1.1** | Development | 2020-12-31 estimated | Maintained <br> 2020-12-31 estimated | |
|
||||
|
@ -256,11 +284,6 @@ Project stable branches will be in one of the following states:
|
|||
| **r0.2** | End Of Life | 2020-04-30 | | 2020-08-31 |
|
||||
| **r0.1** | End Of Life | 2020-03-28 | | 2020-06-30 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Release Notes
|
||||
|
||||
The release notes, see our [RELEASE](RELEASE.md).
|
||||
|
|
81
README_CN.md
81
README_CN.md
|
@ -1,14 +1,15 @@
|
|||
![MindSpore标志](docs/MindSpore-logo.png "MindSpore logo")
|
||||
============================================================
|
||||
|
||||
[View English](./README.md)
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [MindSpore介绍](#mindspore介绍)
|
||||
- [自动微分](#自动微分)
|
||||
- [自动并行](#自动并行)
|
||||
- [安装](#安装)
|
||||
- [二进制文件](#二进制文件)
|
||||
- [来源](#来源)
|
||||
- [pip方式安装](#pip方式安装)
|
||||
- [源码编译方式安装](#源码编译方式安装)
|
||||
- [Docker镜像](#docker镜像)
|
||||
- [快速入门](#快速入门)
|
||||
- [文档](#文档)
|
||||
|
@ -16,9 +17,13 @@
|
|||
- [治理](#治理)
|
||||
- [交流](#交流)
|
||||
- [贡献](#贡献)
|
||||
- [分支维护策略](#分支维护策略)
|
||||
- [现有分支维护状态](#现有分支维护状态)
|
||||
- [版本说明](#版本说明)
|
||||
- [许可证](#许可证)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## MindSpore介绍
|
||||
|
||||
MindSpore是一种适用于端边云场景的新型开源深度学习训练/推理框架。
|
||||
|
@ -56,7 +61,7 @@ MindSpore自动并行的目的是构建数据并行、模型并行和混合并
|
|||
|
||||
## 安装
|
||||
|
||||
### 二进制文件
|
||||
### pip方式安装
|
||||
|
||||
MindSpore提供跨多个后端的构建选项:
|
||||
|
||||
|
@ -77,7 +82,7 @@ MindSpore提供跨多个后端的构建选项:
|
|||
|
||||
1. 请从[MindSpore下载页面](https://www.mindspore.cn/versions)下载并安装whl包。
|
||||
|
||||
```
|
||||
```bash
|
||||
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.0.0/MindSpore/cpu/ubuntu_x86/mindspore-1.0.0-cp37-cp37m-linux_x86_64.whl
|
||||
```
|
||||
|
||||
|
@ -89,29 +94,41 @@ MindSpore提供跨多个后端的构建选项:
|
|||
import mindspore.nn as nn
|
||||
from mindspore import Tensor
|
||||
from mindspore.ops import operations as P
|
||||
|
||||
|
||||
context.set_context(mode=context.GRAPH_MODE, device_target="CPU")
|
||||
|
||||
|
||||
class Mul(nn.Cell):
|
||||
def __init__(self):
|
||||
super(Mul, self).__init__()
|
||||
self.mul = P.Mul()
|
||||
|
||||
|
||||
def construct(self, x, y):
|
||||
return self.mul(x, y)
|
||||
|
||||
|
||||
x = Tensor(np.array([1.0, 2.0, 3.0]).astype(np.float32))
|
||||
y = Tensor(np.array([4.0, 5.0, 6.0]).astype(np.float32))
|
||||
|
||||
|
||||
mul = Mul()
|
||||
print(mul(x, y))
|
||||
```
|
||||
```
|
||||
|
||||
```text
|
||||
[ 4. 10. 18.]
|
||||
```
|
||||
### 来源
|
||||
|
||||
[MindSpore安装](https://www.mindspore.cn/install)。
|
||||
使用pip方式,在不同的环境安装MindSpore,可参考以下文档。
|
||||
|
||||
- [Ascend环境使用pip方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_pip.md)
|
||||
- [GPU环境使用pip方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_pip.md)
|
||||
- [CPU环境使用pip方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_pip.md)
|
||||
|
||||
### 源码编译方式安装
|
||||
|
||||
使用源码编译方式,在不同的环境安装MindSpore,可参考以下文档。
|
||||
|
||||
- [Ascend环境使用源码编译方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_source.md)
|
||||
- [GPU环境使用源码编译方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_source.md)
|
||||
- [CPU环境使用源码编译方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_source.md)
|
||||
|
||||
### Docker镜像
|
||||
|
||||
|
@ -121,27 +138,29 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
|
|||
| 硬件平台 | Docker镜像仓库 | 标签 | 说明 |
|
||||
| :----- | :------------------------ | :----------------------- | :--------------------------------------- |
|
||||
| CPU | `mindspore/mindspore-cpu` | `x.y.z` | 已经预安装MindSpore `x.y.z` CPU版本的生产环境。 |
|
||||
| | | `devel` | 提供开发环境从源头构建MindSpore(`CPU`后端)。安装详情请参考https://www.mindspore.cn/install 。 |
|
||||
| | | `devel` | 提供开发环境从源头构建MindSpore(`CPU`后端)。安装详情请参考<https://www.mindspore.cn/install> 。 |
|
||||
| | | `runtime` | 提供运行时环境安装MindSpore二进制包(`CPU`后端)。 |
|
||||
| GPU | `mindspore/mindspore-gpu` | `x.y.z` | 已经预安装MindSpore `x.y.z` GPU版本的生产环境。 |
|
||||
| | | `devel` | 提供开发环境从源头构建MindSpore(`GPU CUDA10.1`后端)。安装详情请参考https://www.mindspore.cn/install 。 |
|
||||
| | | `devel` | 提供开发环境从源头构建MindSpore(`GPU CUDA10.1`后端)。安装详情请参考<https://www.mindspore.cn/install> 。 |
|
||||
| | | `runtime` | 提供运行时环境安装MindSpore二进制包(`GPU CUDA10.1`后端)。 |
|
||||
| Ascend | <center>—</center> | <center>—</center> | 即将推出,敬请期待。 |
|
||||
|
||||
> **注意:** 不建议从源头构建GPU `devel` Docker镜像后直接安装whl包。我们强烈建议您在GPU `runtime` Docker镜像中传输并安装whl包。
|
||||
|
||||
* CPU
|
||||
- CPU
|
||||
|
||||
对于`CPU`后端,可以直接使用以下命令获取并运行最新的稳定镜像:
|
||||
```
|
||||
|
||||
```bash
|
||||
docker pull mindspore/mindspore-cpu:1.0.0
|
||||
docker run -it mindspore/mindspore-cpu:1.0.0 /bin/bash
|
||||
```
|
||||
|
||||
* GPU
|
||||
- GPU
|
||||
|
||||
对于`GPU`后端,请确保`nvidia-container-toolkit`已经提前安装,以下是`Ubuntu`用户安装指南:
|
||||
```
|
||||
|
||||
```bash
|
||||
DISTRIBUTION=$(. /etc/os-release; echo $ID$VERSION_ID)
|
||||
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
|
||||
curl -s -L https://nvidia.github.io/nvidia-docker/$DISTRIBUTION/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list
|
||||
|
@ -149,8 +168,10 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
|
|||
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
编辑文件 daemon.json:
|
||||
```
|
||||
|
||||
```bash
|
||||
$ vim /etc/docker/daemon.json
|
||||
{
|
||||
"runtimes": {
|
||||
|
@ -161,18 +182,23 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
再次重启docker:
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
使用以下命令获取并运行最新的稳定镜像:
|
||||
```
|
||||
|
||||
```bash
|
||||
docker pull mindspore/mindspore-gpu:1.0.0
|
||||
docker run -it -v /dev/shm:/dev/shm --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.0.0 /bin/bash
|
||||
```
|
||||
|
||||
要测试Docker是否正常工作,请运行下面的Python代码并检查输出:
|
||||
|
||||
```python
|
||||
import numpy as np
|
||||
import mindspore.context as context
|
||||
|
@ -185,7 +211,8 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
|
|||
y = Tensor(np.ones([1,3,3,4]).astype(np.float32))
|
||||
print(F.tensor_add(x, y))
|
||||
```
|
||||
```
|
||||
|
||||
```text
|
||||
[[[ 2. 2. 2. 2.],
|
||||
[ 2. 2. 2. 2.],
|
||||
[ 2. 2. 2. 2.]],
|
||||
|
@ -205,7 +232,6 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
|
|||
|
||||
参考[快速入门](https://www.mindspore.cn/tutorial/training/zh-CN/master/quick_start/quick_start.html)实现图片分类。
|
||||
|
||||
|
||||
## 文档
|
||||
|
||||
有关安装指南、教程和API的更多详细信息,请参阅[用户文档](https://gitee.com/mindspore/docs)。
|
||||
|
@ -228,6 +254,7 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
|
|||
欢迎参与贡献。更多详情,请参阅我们的[贡献者Wiki](CONTRIBUTING.md)。
|
||||
|
||||
## 分支维护策略
|
||||
|
||||
MindSpore的版本分支有以下几种维护阶段:
|
||||
| **状态** | **持续时间** | **说明** |
|
||||
|-------------|---------------|--------------------------------------------------|
|
||||
|
@ -238,6 +265,7 @@ MindSpore的版本分支有以下几种维护阶段:
|
|||
| End Of Life (EOL) | N/A | 不再接受修改合入该分支。 |
|
||||
|
||||
## 现有分支维护状态
|
||||
|
||||
| **分支名** | **当前状态** | **上线时间** | **后续状态** | **EOL 日期** |
|
||||
|--------|--------------|----------------------|-----------------------------------|------------|
|
||||
| **r1.1** | Development | 2020-12-31 estimated | Maintained <br> 2020-12-31 estimated | |
|
||||
|
@ -249,11 +277,6 @@ MindSpore的版本分支有以下几种维护阶段:
|
|||
| **r0.2** | End Of Life | 2020-04-30 | | 2020-08-31 |
|
||||
| **r0.1** | End Of Life | 2020-03-28 | | 2020-06-30 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 版本说明
|
||||
|
||||
版本说明请参阅[RELEASE](RELEASE.md)。
|
||||
|
|
Loading…
Reference in New Issue