提交 ddd4ebed 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!330 update ubuntu env and build cmd - sync

Merge pull request !330 from guozhijian/sync_update_ubuntu_env_build_cmd
...@@ -68,11 +68,11 @@ ...@@ -68,11 +68,11 @@
2. 在源码根目录下执行如下命令编译MindSpore。 2. 在源码根目录下执行如下命令编译MindSpore。
```bash ```bash
bash build.sh -e cpu -z -j4 bash build.sh -e cpu -j4
``` ```
> - 在执行上述命令前,需保证可执行文件cmake和patch所在路径已加入环境变量PATH中。 > - 在执行上述命令前,需保证可执行文件cmake和patch所在路径已加入环境变量PATH中。
> - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 > - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。
> - 如果编译机性能较好,可在执行中增加-j{线程数}来增加线程数量。如`bash build.sh -e cpu -z -j12`。 > - 如果编译机性能较好,可在执行中增加-j{线程数}来增加线程数量。如`bash build.sh -e cpu -j12`。
3. 执行如下命令安装MindSpore。 3. 执行如下命令安装MindSpore。
......
...@@ -68,11 +68,11 @@ This document describes how to quickly install MindSpore on a Ubuntu system with ...@@ -68,11 +68,11 @@ This document describes how to quickly install MindSpore on a Ubuntu system with
2. Run the following command in the root directory of the source code to compile MindSpore: 2. Run the following command in the root directory of the source code to compile MindSpore:
```bash ```bash
bash build.sh -e cpu -z -j4 bash build.sh -e cpu -j4
``` ```
> - Before running the preceding command, ensure that the paths where the executable files cmake and patch store have been added to the environment variable PATH. > - Before running the preceding command, ensure that the paths where the executable files cmake and patch store have been added to the environment variable PATH.
> - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. > - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct.
> - If the compiler performance is strong, you can add -j{Number of threads} in to script to increase the number of threads. For example, `bash build.sh -e cpu -z -j12`. > - If the compiler performance is strong, you can add -j{Number of threads} in to script to increase the number of threads. For example, `bash build.sh -e cpu -j12`.
3. Run the following command to install MindSpore: 3. Run the following command to install MindSpore:
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
| 版本号 | 操作系统 | 可执行文件安装依赖 | 源码编译安装依赖 | | 版本号 | 操作系统 | 可执行文件安装依赖 | 源码编译安装依赖 |
| ---- | :--- | :--- | :--- | | ---- | :--- | :--- | :--- |
| MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64 <br> - Ubuntu 18.04 x86_64 <br> - EulerOS 2.8 aarch64 <br> - EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100) <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> - 其他依赖项参见[requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt) | **编译依赖:**<br> - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100) <br> - [wheel](https://pypi.org/project/wheel/) >= 0.32.0 <br> - [GCC](https://gcc.gnu.org/releases.html) 7.3.0 <br> - [CMake](https://cmake.org/download/) >= 3.14.1 <br> - [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5 <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> **安装依赖:**<br> 与可执行文件安装依赖相同 | | MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64 <br> - Ubuntu 18.04 x86_64 <br> - EulerOS 2.8 aarch64 <br> - EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00<br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> - 其他依赖项参见[requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt) | **编译依赖:**<br> - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00) <br> - [wheel](https://pypi.org/project/wheel/) >= 0.32.0 <br> - [GCC](https://gcc.gnu.org/releases.html) 7.3.0 <br> - [CMake](https://cmake.org/download/) >= 3.14.1 <br> - [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5 <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> **安装依赖:**<br> 与可执行文件安装依赖相同 |
- 确认当前用户有权限访问Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100)的安装路径`/usr/local/Ascend`,若无权限,需要root用户将当前用户添加到`/usr/local/Ascend`所在的用户组,具体配置请详见配套软件包的说明文档。 - 确认当前用户有权限访问Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00)的安装路径`/usr/local/Ascend`,若无权限,需要root用户将当前用户添加到`/usr/local/Ascend`所在的用户组,具体配置请详见配套软件包的说明文档。
- GCC 7.3.0可以直接通过apt命令安装。 - GCC 7.3.0可以直接通过apt命令安装。
- 在联网状态下,安装whl包时会自动下载`requirements.txt`中的依赖项,其余情况需自行安装。 - 在联网状态下,安装whl包时会自动下载`requirements.txt`中的依赖项,其余情况需自行安装。
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
### 配套软件包依赖配置 ### 配套软件包依赖配置
- 安装Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100)提供的whl包,whl包随配套软件包发布,升级配套软件包之后需要重新安装。 - 安装Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00)提供的whl包,whl包随配套软件包发布,升级配套软件包之后需要重新安装。
```bash ```bash
pip install /usr/local/Ascend/fwkacllib/lib64/topi-{version}-py3-none-any.whl pip install /usr/local/Ascend/fwkacllib/lib64/topi-{version}-py3-none-any.whl
...@@ -88,11 +88,11 @@ ...@@ -88,11 +88,11 @@
2. 在源码根目录下,执行如下命令编译MindSpore。 2. 在源码根目录下,执行如下命令编译MindSpore。
```bash ```bash
bash build.sh -e d -z bash build.sh -e ascend
``` ```
> - 在执行上述命令前,需保证可执行文件`cmake`和`patch`所在路径已加入环境变量PATH中。 > - 在执行上述命令前,需保证可执行文件`cmake`和`patch`所在路径已加入环境变量PATH中。
> - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 > - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。
> - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e d -z -j4`。 > - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e ascend -j4`。
3. 执行如下命令安装MindSpore。 3. 执行如下命令安装MindSpore。
...@@ -103,19 +103,40 @@ ...@@ -103,19 +103,40 @@
## 配置环境变量 ## 配置环境变量
- 安装好MindSpore之后,需要导出Runtime相关环境变量。 - EulerOS操作系统,安装好MindSpore之后,需要导出Runtime相关环境变量。
```bash ```bash
# control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING. # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING.
export GLOG_v=2 export GLOG_v=2
# Conda environmental options # Conda environmental options
LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package
# lib libraries that the run package depends on # lib libraries that the run package depends on
export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/fwkacllib/lib64:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/fwkacllib/lib64:${LD_LIBRARY_PATH}
# Environment variables that must be configured
export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path
export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on
```
- Ubuntu操作系统,安装好MindSpore之后,需要导出Runtime相关环境变量,注意:需要将如下配置中{version}替换为环境上真实的版本号。
```bash
# control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING.
export GLOG_v=2
# Conda environmental options
LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package
# lib libraries that the run package depends on
export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/lib64:${LOCAL_ASCEND}/driver/lib64:${LD_LIBRARY_PATH}
# Environment variables that must be configured # Environment variables that must be configured
export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path export TBE_IMPL_PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path
export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path export PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on
``` ```
## 安装验证 ## 安装验证
......
...@@ -32,9 +32,9 @@ This document describes how to quickly install MindSpore on an Ascend AI process ...@@ -32,9 +32,9 @@ This document describes how to quickly install MindSpore on an Ascend AI process
| Version | Operating System | Executable File Installation Dependencies | Source Code Compilation and Installation Dependencies | | Version | Operating System | Executable File Installation Dependencies | Source Code Compilation and Installation Dependencies |
| ---- | :--- | :--- | :--- | | ---- | :--- | :--- | :--- |
| MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64 <br> - Ubuntu 18.04 x86_64 <br> - EulerOS 2.8 aarch64 <br> - EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100) <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> - For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt). | **Compilation dependencies:**<br> - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100) <br> - [wheel](https://pypi.org/project/wheel/) >= 0.32.0 <br> - [GCC](https://gcc.gnu.org/releases.html) 7.3.0 <br> - [CMake](https://cmake.org/download/) >= 3.14.1 <br> - [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5 <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> **Installation dependencies:**<br> same as the executable file installation dependencies. | | MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64 <br> - Ubuntu 18.04 x86_64 <br> - EulerOS 2.8 aarch64 <br> - EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00) <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> - For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt). | **Compilation dependencies:**<br> - [Python](https://www.python.org/downloads/) 3.7.5 <br> - Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00) <br> - [wheel](https://pypi.org/project/wheel/) >= 0.32.0 <br> - [GCC](https://gcc.gnu.org/releases.html) 7.3.0 <br> - [CMake](https://cmake.org/download/) >= 3.14.1 <br> - [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5 <br> - [gmp](https://gmplib.org/download/gmp/) 6.1.2 <br> **Installation dependencies:**<br> same as the executable file installation dependencies. |
- Confirm that the current user has the right to access the installation path `/usr/local/Ascend `of Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100). If not, the root user needs to add the current user to the user group where `/usr/local/Ascend` is located. For the specific configuration, please refer to the software package instruction document. - Confirm that the current user has the right to access the installation path `/usr/local/Ascend `of Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00). If not, the root user needs to add the current user to the user group where `/usr/local/Ascend` is located. For the specific configuration, please refer to the software package instruction document.
- GCC 7.3.0 can be installed by using apt command. - GCC 7.3.0 can be installed by using apt command.
- When the network is connected, dependency items in the `requirements.txt` file are automatically downloaded during .whl package installation. In other cases, you need to manually install dependency items. - When the network is connected, dependency items in the `requirements.txt` file are automatically downloaded during .whl package installation. In other cases, you need to manually install dependency items.
...@@ -56,7 +56,7 @@ This document describes how to quickly install MindSpore on an Ascend AI process ...@@ -56,7 +56,7 @@ This document describes how to quickly install MindSpore on an Ascend AI process
### Configuring software package Dependencies ### Configuring software package Dependencies
- Install the .whl package provided in Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100). The .whl package is released with the software package. After software package is upgraded, reinstall the .whl package. - Install the .whl package provided in Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00). The .whl package is released with the software package. After software package is upgraded, reinstall the .whl package.
```bash ```bash
pip install /usr/local/Ascend/fwkacllib/lib64/topi-{version}-py3-none-any.whl pip install /usr/local/Ascend/fwkacllib/lib64/topi-{version}-py3-none-any.whl
...@@ -87,11 +87,11 @@ The compilation and installation must be performed on the Ascend 910 AI processo ...@@ -87,11 +87,11 @@ The compilation and installation must be performed on the Ascend 910 AI processo
2. Run the following command in the root directory of the source code to compile MindSpore: 2. Run the following command in the root directory of the source code to compile MindSpore:
```bash ```bash
bash build.sh -e d -z bash build.sh -e ascend
``` ```
> - Before running the preceding command, ensure that the paths where the executable files `cmake` and `patch` store have been added to the environment variable PATH. > - Before running the preceding command, ensure that the paths where the executable files `cmake` and `patch` store have been added to the environment variable PATH.
> - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. > - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct.
> - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e d -z -j4`. > - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e ascend -j4`.
3. Run the following command to install MindSpore: 3. Run the following command to install MindSpore:
...@@ -102,19 +102,40 @@ The compilation and installation must be performed on the Ascend 910 AI processo ...@@ -102,19 +102,40 @@ The compilation and installation must be performed on the Ascend 910 AI processo
## Configuring Environment Variables ## Configuring Environment Variables
- After MindSpore is installed, export runtime-related environment variables. - In EulerOS, after MindSpore is installed, export runtime-related environment variables.
```bash ```bash
# control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING. # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING.
export GLOG_v=2 export GLOG_v=2
# Conda environmental options # Conda environmental options
LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package
# lib libraries that the run package depends on # lib libraries that the run package depends on
export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/fwkacllib/lib64:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/fwkacllib/lib64:${LD_LIBRARY_PATH}
# Environment variables that must be configured
export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path
export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on
```
- In Ubuntu, after MindSpore is installed, export runtime-related environment variables. Note: you need to replace {version} in the following configuration with the actual version number on the environment.
```bash
# control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING.
export GLOG_v=2
# Conda environmental options
LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package
# lib libraries that the run package depends on
export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/lib64:${LOCAL_ASCEND}/driver/lib64:${LD_LIBRARY_PATH}
# Environment variables that must be configured # Environment variables that must be configured
export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path export TBE_IMPL_PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path
export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path export PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on
``` ```
## Installation Verification ## Installation Verification
......
...@@ -68,11 +68,11 @@ ...@@ -68,11 +68,11 @@
2. 在源码根目录下执行如下命令编译MindSpore。 2. 在源码根目录下执行如下命令编译MindSpore。
```bash ```bash
bash build.sh -e gpu -M on -z bash build.sh -e gpu
``` ```
> - 在执行上述命令前,需保证可执行文件`cmake`和`patch`所在路径已加入环境变量PATH中。 > - 在执行上述命令前,需保证可执行文件`cmake`和`patch`所在路径已加入环境变量PATH中。
> - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 > - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。
> - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e gpu -M on -z -j4`。 > - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e gpu -j4`。
3. 执行如下命令安装MindSpore。 3. 执行如下命令安装MindSpore。
......
...@@ -68,11 +68,11 @@ This document describes how to quickly install MindSpore on a NVIDIA GPU environ ...@@ -68,11 +68,11 @@ This document describes how to quickly install MindSpore on a NVIDIA GPU environ
2. Run the following command in the root directory of the source code to compile MindSpore: 2. Run the following command in the root directory of the source code to compile MindSpore:
```bash ```bash
bash build.sh -e gpu -M on -z bash build.sh -e gpu
``` ```
> - Before running the preceding command, ensure that the paths where the executable files `cmake` and `patch` store have been added to the environment variable PATH. > - Before running the preceding command, ensure that the paths where the executable files `cmake` and `patch` store have been added to the environment variable PATH.
> - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. > - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct.
> - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e gpu -M on -z -j4`. > - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e gpu -j4`.
3. Run the following command to install MindSpore: 3. Run the following command to install MindSpore:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册