From f62bbc45e279862bc46bcb75a9f4a7c113d39571 Mon Sep 17 00:00:00 2001 From: zhangyi Date: Tue, 29 Mar 2022 20:04:10 +0800 Subject: [PATCH] modify the English files --- .../mindspore_cpu_mac_install_source_en.md | 24 ++++++++-------- install/mindspore_cpu_win_install_conda_en.md | 10 +++---- .../mindspore_cpu_win_install_nightly_en.md | 15 ++++++---- install/mindspore_cpu_win_install_pip_en.md | 8 ++++-- .../mindspore_cpu_win_install_source_en.md | 25 ++++++++++------- install/mindspore_gpu_install_conda_en.md | 16 ++++++----- install/mindspore_gpu_install_docker_en.md | 22 +++++++-------- install/mindspore_gpu_install_nightly_en.md | 14 ++++++---- install/mindspore_gpu_install_pip_en.md | 28 ++++++++++--------- install/mindspore_gpu_install_source_en.md | 24 ++++++++-------- 10 files changed, 103 insertions(+), 83 deletions(-) diff --git a/install/mindspore_cpu_mac_install_source_en.md b/install/mindspore_cpu_mac_install_source_en.md index 88ec059ef6..74b2efc19d 100644 --- a/install/mindspore_cpu_mac_install_source_en.md +++ b/install/mindspore_cpu_mac_install_source_en.md @@ -18,14 +18,14 @@ This document describes how to quickly install MindSpore by compiling source cod ## System Environment Information Confirmation -- According to your Macbook configuration(click `About This Mac` to get chip/arch info),choose the right Python version based on following table: +- According to the system and chip situation in the table below to determine the appropriate Python version, macOS version and chip information can be found by clicking on the Apple logo in the upper left corner of the desktop - > `About this mac`: |Chip|Architecture|macOS Version|Supported Python Version| |-|-|-|-| - |M1|ARM|11.3|Python 3.9.1+(3.7.x is not supported with M1, 3.9.1 is the least supported version)| + |M1|ARM|11.3|Python 3.9.1+(3.7 is not supported with M1, and 3.9.1 is the least version supported by 3.9)| |Intel|x86_64|10.15/11.3|Python 3.7.5/Python 3.9.0| -- Ensure that right Python version is installed. If not installed, download and install Python from: +- Ensure that right Python version is installed. If not installed or been installed Python in other versions, download and install Python from: - Python 3.7.5 (64-bit):[Python official website](https://www.python.org/ftp/python/3.7.5/python-3.7.5-macosx10.9.pkg) or [HUAWEI CLOUD](https://repo.huaweicloud.com/python/3.7.5/python-3.7.5-macosx10.9.pkg). - Python 3.9.0 (64-bit):[Python official website](https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg) or [HUAWEI CLOUD](https://repo.huaweicloud.com/python/3.9.0/python-3.9.0-macosx10.9.pkg). @@ -33,9 +33,9 @@ This document describes how to quickly install MindSpore by compiling source cod - Ensure that [Xcode](https://xcodereleases.com/) (>=12.4 and <= 13.0) is installed, where 12.4(X86) and 13.0(m1) are verified. -- Ensure that `Command Line Tools` for Xcode is installed. If not, use `sudo xcode-select --install` command to install it. +- Ensure that `Command Line Tools for Xcode` is installed. If not, use `sudo xcode-select --install` command to install Command Line Tools. -- Ensure that [CMake](https://cmake.org/download/) > `3.18.3` is installed. Use `brew install cmake` if it's not installed. +- Ensure that [CMake 3.18.3 and the later version](https://cmake.org/download/) is installed. Use `brew install cmake` if it's not installed. - Ensure that [patch 2.5](https://ftp.gnu.org/gnu/patch/) is installed. Use `brew install patch` if it's not installed. @@ -54,18 +54,20 @@ Run the following command in the root directory of the source code to compile Mi ```bash export CC=/usr/bin/clang export CXX=/usr/bin/clang++ -bash build.sh -e cpu -S on -j4 # -j stands for the thread number can be compiling with, can assign twice as much as CPU cores +bash build.sh -e cpu -S on -j4 # -j is a thread configuration when compiled, and if cpu performance is better, compile using multithreading, with parameters usually twice the number of CPU cores ``` -The artifact of MindSpore should lie in directory `output/` within the repo directory. - ## Installing MindSpore ```bash pip install output/mindspore-*.whl -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ->If there is any compile error when installing scipy package, please use `pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy` to install scipy package first, then install mindspore package as normal. +If there is any compile error when installing scipy package, please use the following command to install scipy package first, then install mindspore package. + +```bash +pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy +``` ## Installation Verification @@ -86,7 +88,7 @@ It means MindSpore has been installed successfully. Using the following command if you need to update the MindSpore version: -- Update online +- Update online directly ```bash pip install --upgrade mindspore @@ -94,7 +96,7 @@ Using the following command if you need to update the MindSpore version: - Update after source code compilation - After successfully executing the compile script `build.sh` in the root path of the source code, find the whl package in path `output`, use the following command to update your version. + After successfully executing the compilation script `build.sh` in the source code root directory, find the generated whl installation package by compilation in the `output` directory, and then execute the command to upgrade. ```bash pip install --upgrade mindspore-{version}-{python_version}-macosx_{platform_version}_{arch}.whl diff --git a/install/mindspore_cpu_win_install_conda_en.md b/install/mindspore_cpu_win_install_conda_en.md index cb5f0807ba..7faf98ed07 100644 --- a/install/mindspore_cpu_win_install_conda_en.md +++ b/install/mindspore_cpu_win_install_conda_en.md @@ -17,15 +17,15 @@ The following describes how to quickly install MindSpore by Conda on Windows in the CPU environment. -For details about how to install third-party dependency software when confirming the system environment information, see the third-party dependency software installation section in the [Installing MindSpore Using Source Code Build on Windows (CPU)](https://www.mindspore.cn/news/newschildren?id=364) provided by the community. Thank you to the community member [lvmingfu](https://gitee.com/lvmingfu) for sharing. +For details about how to install third-party dependency software when confirming the system environment information, see the third-party dependency software installation section in the [Installing MindSpore Using Source Code Build on Windows (CPU)](https://www.mindspore.cn/news/newschildren?id=364) provided by the community. Thanks to the community member [lvmingfu](https://gitee.com/lvmingfu) for sharing. ## System Environment Information Confirmation - Ensure that Windows 10 is installed with the x86 architecture 64-bit operating system. -- Ensure that the Conda version is compatible with the current system. +- Ensure that the Conda version that is compatible with the current system is installed. - If you prefer the complete capabilities provided by Conda, you can choose to download [Anaconda3](https://repo.anaconda.com/archive/). - - If you want to save disk space or prefer custom Conda installation, you can choose to download [Miniconda3](https://repo.anaconda.com/miniconda/). + - If you want to save disk space or prefer customizing Conda installation package, you can choose to download [Miniconda3](https://repo.anaconda.com/miniconda/). ## Creating and Accessing the Conda Virtual Environment @@ -55,7 +55,7 @@ conda install mindspore-cpu={version} -c mindspore -c conda-forge In the preceding information: - When the network is connected, dependency items are automatically downloaded during .whl package installation. (For details about the dependency, see required_package in [setup.py](https://gitee.com/mindspore/mindspore/blob/master/setup.py) .) In other cases, you need to install it by yourself. When running models, you need to install additional dependencies based on requirements.txt specified for different models in [ModelZoo](https://gitee.com/mindspore/models/tree/master/). For details about common dependencies, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/master/requirements.txt). -- `{version}` denotes the version of MindSpore. For example, when you are installing MindSpore 1.5.0rc1, `{version}` should be 1.5.0rc1. +- `{version}` denotes the version number of MindSpore. For example, when you are installing MindSpore 1.5.0rc1, `{version}` should be 1.5.0rc1. ## Installation Verification @@ -74,7 +74,7 @@ It means MindSpore has been installed successfully. ## Version Update -Using the following command if you need to update the MindSpore version: +Use the following command if you need to update the MindSpore version: ```bash conda update mindspore-cpu -c mindspore -c conda-forge diff --git a/install/mindspore_cpu_win_install_nightly_en.md b/install/mindspore_cpu_win_install_nightly_en.md index 84225b6ea4..6e1d898962 100644 --- a/install/mindspore_cpu_win_install_nightly_en.md +++ b/install/mindspore_cpu_win_install_nightly_en.md @@ -16,15 +16,17 @@ MindSpore Nightly is a preview version which includes latest features and bugfix This document describes how to quickly install MindSpore Nightly by pip in a Linux system with a CPU environment. +For details about how to install third-party dependency software when confirming the system environment information, see the third-party dependency software installation section in the [Installing MindSpore Using Source Code Build on Windows (CPU)](https://www.mindspore.cn/news/newschildren?id=364) provided by the community. Thanks to the community member [lvmingfu](https://gitee.com/lvmingfu) for sharing. + ## System Environment Information Confirmation - Ensure that Windows 10 is installed with the x86 architecture 64-bit operating system. -- Ensure that Python 3.7.5 or 3.9.0 is installed. If not installed, download and install Python from: +- Ensure that Python 3.7.5 or 3.9.0 is installed. If not installed or been installed Python in other versions, download and install Python from: - Python 3.7.5 (64-bit): [Python official website](https://www.python.org/ftp/python/3.7.5/python-3.7.5-amd64.exe) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.7.5/python-3.7.5-amd64.exe). - Python 3.9.0 (64-bit): [Python official website](https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.9.0/python-3.9.0-amd64.exe). -- After installing Python, add Python and pip to the environment variable. - - Add Python: Control Panel -> System -> Advanced System Settings -> Environment Variables. Double click the Path in the environment variable and add the path of `python.exe`. - - Add pip: The `Scripts` folder in the same directory of `python.exe` is the pip file that comes with Python, add it to the system environment variable. +- After installing Python, add Python and pip to the system environment variable. + - Add Python: Control Panel -> System -> Advanced System Settings -> Environment Variables. Double click the Path in the system variable and add the path of `python.exe`. + - Add pip: The `Scripts` folder in the same directory of `python.exe` is the pip file that comes with Python, and add it to the system environment variable. ## Installing MindSpore @@ -56,7 +58,7 @@ It means MindSpore has been installed successfully. ## Version Update -Using the following command if you need to update the MindSpore version: +Use the following command if you need to update the MindSpore version: ```bash pip install --upgrade mindspore-dev=={version} @@ -64,4 +66,5 @@ pip install --upgrade mindspore-dev=={version} Of which, -- When updating to a release candidate (rc) version, `{version}` should be specified, e.g. 1.6.0rc1.dev20211125; When updating to a standard release, `=={version}` could be removed. +- When updating to a release candidate (rc) version, `{version}` should be specified manually, e.g. 1.6.0rc1.dev20211125; When automatically updating to the latest version, `=={version}` could be removed. + diff --git a/install/mindspore_cpu_win_install_pip_en.md b/install/mindspore_cpu_win_install_pip_en.md index 17beb6784c..7d06780ec7 100644 --- a/install/mindspore_cpu_win_install_pip_en.md +++ b/install/mindspore_cpu_win_install_pip_en.md @@ -14,6 +14,8 @@ This document describes how to quickly install MindSpore by pip in a Windows system with a CPU environment. +For details about how to install third-party dependency software when confirming the system environment information, see the third-party dependency software installation section in the [Installing MindSpore Using Source Code Build on Windows (CPU)](https://www.mindspore.cn/news/newschildren?id=364) provided by the community. Thanks to the community member [lvmingfu](https://gitee.com/lvmingfu) for sharing. + ## System Environment Information Confirmation - Ensure that Windows 10 is installed with the x86 architecture 64-bit operating system. @@ -22,7 +24,7 @@ This document describes how to quickly install MindSpore by pip in a Windows sys - Python 3.9.0 (64-bit): [Python official website](https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.9.0/python-3.9.0-amd64.exe). - After installing Python, add Python and pip to the environment variable. - Add Python: Control Panel -> System -> Advanced System Settings -> Environment Variables. Double click the Path in the environment variable and add the path of `python.exe`. - - Add pip: The `Scripts` folder in the same directory of `python.exe` is the pip file that comes with Python, add it to the system environment variable. + - Add pip: The `Scripts` folder in the same directory `python.exe` is the pip file that comes with Python, and add it to the system environment variable. ## Installing MindSpore @@ -55,7 +57,7 @@ It means MindSpore has been installed successfully. ## Version Update -Using the following command if you need to update the MindSpore version: +Use the following command if you need to update the MindSpore version: ```bash pip install --upgrade mindspore=={version} @@ -63,4 +65,4 @@ pip install --upgrade mindspore=={version} Of which, -- When updating to a release candidate (rc) version, `{version}` should be specified, e.g. 1.5.0rc1; When updating to a standard release, `=={version}` could be removed. +- When updating to a release candidate (rc) version, `{version}` should be specified manually, e.g. 1.5.0rc1; When updating to a standard release, `=={version}` could be removed. diff --git a/install/mindspore_cpu_win_install_source_en.md b/install/mindspore_cpu_win_install_source_en.md index 7a56137e4f..37c5bce795 100644 --- a/install/mindspore_cpu_win_install_source_en.md +++ b/install/mindspore_cpu_win_install_source_en.md @@ -16,6 +16,8 @@ This document describes how to quickly install MindSpore by source code in a Windows system with a CPU environment. +For the detailed steps, see the third-party dependency software installation section in the [Installing MindSpore Using Source Code Build on Windows (CPU)](https://www.mindspore.cn/news/newschildren?id=364) provided by the community. Thanks to the community member [lvmingfu](https://gitee.com/lvmingfu) for sharing. + ## System Environment Information Confirmation - Ensure that Windows 10 is installed with the x86 architecture 64-bit operating system. @@ -23,22 +25,25 @@ This document describes how to quickly install MindSpore by source code in a Win - Ensure that [Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/zh-CN/download/details.aspx?id=48145) is installed. - Ensure that [git](https://github.com/git-for-windows/git/releases/download/v2.29.2.windows.2/Git-2.29.2.2-64-bit.exe) tool is installed. - - If git was not installed in `ProgramFiles`, you will need to set environment variable to where `patch.exe` is allocated. For example, when git was install in `D:\git`, `set MS_PATCH_PATH=D:\git\usr\bin`. + +- If git was not installed in `ProgramFiles`, you will need to set environment variable to where `patch.exe` is allocated. For example, when git was install in `D:\git`, `set MS_PATCH_PATH=D:\git\usr\bin` needs to be set. - Ensure that [MinGW-W64 GCC-7.3.0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-posix/seh/x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z) is installed. - - Ensure that path of source code does not include special characters (Chinese, Janpanese characters etc.). After installing, add the path `MinGW\bin`to the environment variable PATH.For example, the installation directory is in `D:\gcc`, then you will need to add `D:\gcc\MinGW\bin` to the system environment variable PATH. + +- Ensure that path of source code does not include special characters (Chinese, Janpanese characters etc.). After installing, add the path `MinGW\bin`to the environment variable PATH.For example, the installation directory is in `D:\gcc`, then you will need to add `D:\gcc\MinGW\bin` to the system environment variable PATH. - Ensure that [CMake 3.18.3](https://github.com/Kitware/Cmake/releases/tag/v3.18.3) is installed. - - Ensure that path of source code does not include special characters (Chinese, Janpanese characters etc.). After installing, add the path of `cmake.exe` to the environment variable PATH. + +- Ensure that path of source code does not include special characters (Chinese, Janpanese characters etc.). After installing, add the path of `cmake.exe` to the environment variable PATH. - Ensure that [ActivePerl 5.28.1.2801 or later](https://downloads.activestate.com/ActivePerl/releases/5.28.1.2801/ActivePerl-5.28.1.2801-MSWin32-x64-24563874.exe) is installed. -- Ensure that Python 3.7.5 or 3.9.0 is installed. If not installed, download and install Python from: +- Ensure that Python 3.7.5 or 3.9.0 is installed. If not installed or been installed Python in other versions, download and install Python from: - Python 3.7.5 (64-bit): [Python official website](https://www.python.org/ftp/python/3.7.5/python-3.7.5-amd64.exe) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.7.5/python-3.7.5-amd64.exe). - Python 3.9.0 (64-bit): [Python official website](https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.9.0/python-3.9.0-amd64.exe). - - - Ensure that path of source code does not include special characters (Chinese, Janpanese characters etc.). After installing, add the path of `python.exe` to the environment variable PATH. The `Scripts` folder in the same directory of `python.exe` is the pip file that comes with Python, you also need to add the path of the pip file to the environment variable PATH. + - Ensure that path of source code does not include special characters (Chinese, Janpanese characters etc.). After installing, add the path of `python.exe` to the environment variable Path. The `Scripts` folder in the same directory of `python.exe` is the pip file that comes with Python, and you also need to add the path of the pip file to the environment variable Path. +- Ensure that [wheel 0.32.0 and later](https://pypi.org/project/wheel/) is installed. ## Downloading Source Code from Code Repository @@ -64,7 +69,7 @@ Of which, - When the network is connected, dependency items are automatically downloaded during .whl package installation. (For details about the dependency, see required_package in [setup.py](https://gitee.com/mindspore/mindspore/blob/master/setup.py) .) In other cases, you need to install it by yourself. When running models, you need to install additional dependencies based on requirements.txt specified for different models in [ModelZoo](https://gitee.com/mindspore/models/tree/master/). For details about common dependencies, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/master/requirements.txt). - `{version}` specifies the MindSpore version number. For example, when installing MindSpore 1.5.0-rc1, set `{version}` to 1.5.0rc1. -- `{python_version}` spcecifies the python version for which MindSpore is built. If you wish to use Python3.7.5,`{python_version}` should be `cp37-cp37m`. If Python3.9.0 is used, it should be `cp39-cp39`. +- `{python_version}` spcecifies the python version of the user. If Python3.7.5 is used,`{python_version}` should be `cp37-cp37m`. If Python3.9.0 is used, it should be `cp39-cp39`. ## Installation Verification @@ -83,9 +88,9 @@ It means MindSpore has been installed successfully. ## Version Update -Using the following command if you need to update the MindSpore version: +Use the following command if you need to update the MindSpore version: -- Update online +- Update online directly ```bash pip install --upgrade mindspore @@ -93,7 +98,7 @@ Using the following command if you need to update the MindSpore version: - Update after source code compilation - After successfully executing the compile script `build.bat` in the root path of the source code, find the whl package in path `output`, use the following command to update your version. + After successfully executing the compile script `build.bat` in the source code of the root directory, find the .whl package generated by compilation in directory `output`, and use the following command to update your version. ```bash pip install --upgrade mindspore-{version}-{python_version}-win_amd64.whl diff --git a/install/mindspore_gpu_install_conda_en.md b/install/mindspore_gpu_install_conda_en.md index bf20e7e119..7324925db3 100644 --- a/install/mindspore_gpu_install_conda_en.md +++ b/install/mindspore_gpu_install_conda_en.md @@ -30,13 +30,13 @@ This document describes how to quickly install MindSpore by Conda in a Linux sys wget https://gitee.com/mindspore/mindspore/raw/master/scripts/install/ubuntu-gpu-conda.sh # install Python 3.7, CUDA 11.1 and the latest MindSpore by default bash -i ./ubuntu-gpu-conda.sh - # to specify Python, CUDA and MindSpore version, e.g. Python 3.9, CUDA 10.1 and MindSpore 1.5.0 + # to specify Python, CUDA and MindSpore version, taking Python 3.9, CUDA 10.1 and MindSpore 1.5.0 as examples, use the following manners # PYTHON_VERSION=3.9 CUDA_VERSION=10.1 MINDSPORE_VERSION=1.5.0 bash -i ./ubuntu-gpu-conda.sh ``` This script performs the following operations: - - Change the source list to HUAWEI CLOUD source. + - Change the software source configuration to a HUAWEI CLOUD source. - Install the dependencies required by MindSpore, such as GCC, gmp. - Download and install CUDA and cuDNN. - Install Conda and create a virtual environment for MindSpore. @@ -108,7 +108,7 @@ sudo cp cuda/lib64/libcudnn* /usr/local/cuda-11.1/lib64 sudo chmod a+r /usr/local/cuda-11.1/include/cudnn.h /usr/local/cuda-11.1/lib64/libcudnn* ``` -If a different version of CUDA have been installed or the CUDA installation path is different, just replace `/usr/local/cuda-11.1` in the above command with the currently installed CUDA path. +If a different version of CUDA have been installed or the CUDA installation path is different, just replace `/usr/local/cuda-11.1` in the above command with the CUDA path currently installed. ### Installing Conda @@ -123,6 +123,8 @@ cd - conda init bash ``` +After the installation is complete, you can set up Tsinghua source acceleration download for Conda, and see [here](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/). + ### Installing GCC and gmp Run the following commands to install GCC and gmp. @@ -165,7 +167,7 @@ cd - ### Installing TensorRT (optional) -After completing the installation of CUDA and cuDNN, download TensorRT 7.2.2 for CUDA 11.1 from [TensorRT download page](https://developer.nvidia.com/nvidia-tensorrt-7x-download), and note to download installation package in TAR format. Suppose the downloaded file is named `TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz`. Install TensorRT with the following command. +After completing the installation of CUDA and cuDNN, download TensorRT 7.2.2 for CUDA 11.1 from [TensorRT download page](https://developer.nvidia.com/nvidia-tensorrt-7x-download), and note to download installation package in TAR format. Suppose the downloaded file is named `TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz`, install TensorRT with the following command. ```bash tar xzf TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz @@ -178,7 +180,7 @@ cd - ## Creating and Accessing the Conda Virtual Environment -Create a Conda virtual environment based on the Python version you want to use and activate the virtual environment. +Create a Conda virtual environment based on the Python version you want to use and go to the virtual environment. If you want to use Python 3.7.5: @@ -196,7 +198,7 @@ conda activate mindspore_py39 ## Installing MindSpore -Ensure that you are in the Conda virtual environment and run the following command to install the latest MindSpore. To install other versions, please refer to [Version List](https://www.mindspore.cn/versions) and specify the version after `mindspore-gpu=`. +Ensure that you are in the Conda virtual environment and run the following command to install the latest MindSpore. To install other versions, please refer to the specified version number of [Version List](https://www.mindspore.cn/versions) after `mindspore-ascend=`. For CUDA 10.1: @@ -243,7 +245,7 @@ y = Tensor(np.ones([1,3,3,4]).astype(np.float32)) print(ops.add(x, y)) ``` -- The outputs should be the same as: +The outputs should be the same as: ```text [[[[2. 2. 2. 2.] diff --git a/install/mindspore_gpu_install_docker_en.md b/install/mindspore_gpu_install_docker_en.md index 3c6e1b83f3..b566631d6c 100644 --- a/install/mindspore_gpu_install_docker_en.md +++ b/install/mindspore_gpu_install_docker_en.md @@ -26,17 +26,17 @@ The current support for containerized build is as follows: | | `mindspore/mindspore-gpu` | `devel` | Provide a development environment to build MindSpore from the source (`GPU CUDA11.1` backend). For installation details, please refer to . | | | `mindspore/mindspore-gpu` | `runtime` | Provide runtime environment, MindSpore binary package (`GPU CUDA11.1` backend) is not installed. | -> **Note:** It is not recommended to install the whl package directly after building the GPU `devel` Docker image from the source. We strongly recommend that you transfer and install the `whl` package in the GPU `runtime` Docker image. +> **Note:** It is not recommended to install the .whl package directly after building the GPU `devel` Docker image from the source. We strongly recommend that you transfer and install the `whl` package in the GPU `runtime` Docker image. > `x.y.z` corresponds to the MindSpore version number. For example, when installing MindSpore version 1.1.0, `x.y.z` should be written as 1.1.0. ## System Environment Information Confirmation -- Ensure that a 64-bit Linux operating system is installed, where Ubuntu 18.04 is verified. +- Ensure that a 64-bit Linux operating system with x86 architecture is installed, where Ubuntu 18.04 is verified. - Ensure that [Docker 18.03 or later versioin](https://docs.docker.com/get-docker/) is installed. ## nvidia-container-toolkit Installation -For the `GPU` backend, please make sure that `nvidia-container-toolkit` has been installed in advance. The following is the installation guide for `nvidia-container-toolkit` for `Ubuntu` users: +For the `GPU` backend, please make sure that `nvidia-container-toolkit` has been installed in advance. The following is the `nvidia-container-toolkit` installation guide for `Ubuntu` users: ```bash # Acquire version of operating system version @@ -48,7 +48,7 @@ sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-d sudo systemctl restart docker ``` -daemon.json is the configuration file of Docker. Edit the file daemon.json to configure the container runtime so that Docker can use nvidia-container-runtime: +daemon.json is the configuration file of Docker. When the editing file daemon.json configures the container to run, Docker can use nvidia-container-runtime: ```bash $ vim /etc/docker/daemon.json @@ -80,9 +80,9 @@ docker pull swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore-gpu-{cuda_versi of which, - `{version}` corresponds to MindSpore version, e.g. 1.5.0. -- `{cuda_version}` corresponds to CUDA version of which MindSpore is based on, including `cuda10.1` and `cuda11.1`. +- `{cuda_version}` corresponds to CUDA version that MindSpore depends on, including `cuda10.1` and `cuda11.1`. -If you wish to obtain a develop environment or runtime environment: +If you wish to obtain a build environment or runtime environment: ```bash docker pull swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore-gpu:{tag} @@ -105,9 +105,9 @@ of which, - `-v /dev/shm:/dev/shm` mounts the directory where the NCCL shared memory segment is located into the container; - `--runtime=nvidia` is used to specify the container runtime as `nvidia-container-runtime`; - `{tag}` corresponds to the label in the above table. -- `{cuda_version}` corresponds to CUDA version of which MindSpore is based on, including `cuda10.1` and `cuda11.1`. +- `{cuda_version}` corresponds to CUDA version that MindSpore depends on, including `cuda10.1` and `cuda11.1`. -If you want to use MindInsight, you need to set the `--network` parameter to `host` mode, for example: +If you want to use the visual debugging tuning tool MindInsight, you need to set the `--network` parameter to `host` mode, for example: ```bash docker run -it -v /dev/shm:/dev/shm --network host --runtime=nvidia swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore-gpu-{cuda_version}:{tag} /bin/bash @@ -132,7 +132,7 @@ MindSpore version: __version__ The result of multiplication calculation is correct, MindSpore has been installed successfully! ``` -It means MindSpore has been installed by docker successfully. +So far, it means MindSpore GPU has been installed by Docker successfully. ii: @@ -149,7 +149,7 @@ y = Tensor(np.ones([1,3,3,4]).astype(np.float32)) print(ops.add(x, y)) ``` -The outputs should be the same as: +When the code is run successfully, the outputs should be the same as: ```text [[[[2. 2. 2. 2.] @@ -165,7 +165,7 @@ The outputs should be the same as: [2. 2. 2. 2.]]]] ``` -It means MindSpore has been installed by docker successfully. +It means MindSpore GPU has been installed by Docker successfully. - If you need to verify the MindInsight installation: diff --git a/install/mindspore_gpu_install_nightly_en.md b/install/mindspore_gpu_install_nightly_en.md index fc2b858baf..6228ad6daa 100644 --- a/install/mindspore_gpu_install_nightly_en.md +++ b/install/mindspore_gpu_install_nightly_en.md @@ -16,18 +16,20 @@ MindSpore Nightly is a preview version which includes latest features and bugfix This document describes how to quickly install MindSpore Nightly by pip in a Linux system with a GPU environment. +For details about how to install third-party dependency software when confirming the system environment information, see the third-party dependency software installation section in the [Experience source code compilation and install the MindSpore GPU version on Linux](https://www.mindspore.cn/news/newschildren?id=401) provided by the community. Thanks to the community member [Flying penguin](https://gitee.com/zhang_yi2020) for sharing. + ## System Environment Information Confirmation - Ensure that the 64-bit operating system is installed and the [glibc](https://www.gnu.org/software/libc/)>=2.17, where Ubuntu 18.04 is verified. - Ensure that [GCC 7.3.0](https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz) is installed. - Ensure that [CUDA 11.1](https://developer.nvidia.com/cuda-11.1.0-download-archive) with [cuDNN 8.0.X](https://developer.nvidia.com/rdp/cudnn-archive) is installed. - - If CUDA is installed in a non-default path, after installing CUDA, environment variable `PATH`(e.g. `export PATH=/usr/local/cuda-${version}/bin:$PATH`) and `LD_LIBRARY_PATH`(e.g. `export LD_LIBRARY_PATH=/usr/local/cuda-${version}/lib64:$LD_LIBRARY_PATH`) need to be set. Please refer to [CUDA installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions) for detailed post installation actions. + - If CUDA is installed in a non-default path, after installing CUDA, environment variable PATH (e.g. `export PATH=/usr/local/cuda-${version}/bin:$PATH`) and `LD_LIBRARY_PATH`(e.g. `export LD_LIBRARY_PATH=/usr/local/cuda-${version}/lib64:$LD_LIBRARY_PATH`) need to be set. Please refer to [CUDA installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions) for detailed post installation actions. - Ensure that [OpenMPI 4.0.3](https://www.open-mpi.org/faq/?category=building#easy-build) is installed. (optional, required for single-node/multi-GPU and multi-node/multi-GPU training) - Ensure that [OpenSSL 1.1.1 or later](https://github.com/openssl/openssl.git) is installed. - Ensure that [OpenSSL](https://github.com/openssl/openssl) is installed and set system variable `export OPENSSL_ROOT_DIR="OpenSSL installation directory"`. -- Ensure that [TensorRT-7.2.2](https://developer.nvidia.com/nvidia-tensorrt-download) is installed. (optional,required for Serving inference). +- Ensure that [TensorRT-7.2.2](https://developer.nvidia.com/nvidia-tensorrt-download) is installed (optional,required for Serving inference). - Ensure that [gmp 6.1.2](https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz) is installed. -- Ensure that Python 3.7.5 or 3.9.0 is installed. If not installed, download and install Python from: +- Ensure that Python 3.7.5 or 3.9.0 is installed. If not installed or been installed Python in other versions, download and install Python from: - Python 3.7.5 (64-bit): [Python official website](https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.7.5/Python-3.7.5.tgz). - Python 3.9.0 (64-bit): [Python official website](https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz) or [HUAWEI CLOUD](https://mirrors.huaweicloud.com/python/3.9.0/Python-3.9.0.tgz). @@ -96,7 +98,7 @@ It means MindSpore has been installed successfully. ## Version Update -Using the following command if you need to update the MindSpore version: +Use the following command if you need to update the MindSpore version: ```bash pip install --upgrade mindspore-cuda11-dev=={version} @@ -104,6 +106,6 @@ pip install --upgrade mindspore-cuda11-dev=={version} Of which, -- When updating to a release candidate (rc) version, `{version}` should be specified, e.g. 1.6.0rc1.dev20211125; When updating to a standard release, `=={version}` could be removed. +- When updating to a release candidate (rc) version, `{version}` should be specified manually, e.g. 1.6.0rc1.dev20211125; When you want to upgrade to the latest version automatically, `=={version}` could be removed. -Note: MindSpore with CUDA11 is selected by default when upgrading version 1.3.0 and above. If you still want to use MindSpore with CUDA10, please select the corresponding wheel installation package. +Note: Currently MindSpore GPU nightly is only available in the CUDA11 version. If you still want to use the CUDA10 version, please refer to the source code compilation guide to compile it yourself on the environment where CUDA10 is installed. diff --git a/install/mindspore_gpu_install_pip_en.md b/install/mindspore_gpu_install_pip_en.md index 1f8ef83e86..569d7aa3dd 100644 --- a/install/mindspore_gpu_install_pip_en.md +++ b/install/mindspore_gpu_install_pip_en.md @@ -22,20 +22,20 @@ This document describes how to quickly install MindSpore by pip in a Linux syste - If you want to install MindSpore by pip on a fresh Ubuntu 18.04 with a GPU environment, you may use [automatic installation script](https://gitee.com/mindspore/mindspore/raw/master/scripts/install/ubuntu-gpu-pip.sh) for one-click installation. The automatic installation script will install MindSpore and its dependencies. - The root permission is required because the script will modify the source list and install dependencies via APT. Run the following command to obtain and run the automatic installation script: + The root permission is required because the automatic installation script needs to change the software source configuration and install dependencies via APT. Run the following command to obtain and run the automatic installation script: ```bash wget https://gitee.com/mindspore/mindspore/raw/master/scripts/install/ubuntu-gpu-pip.sh # install Python 3.7, CUDA 11.1 and MindSpore 1.6.0 by default bash -i ./ubuntu-gpu-pip.sh - # to install Python 3.9, CUDA 10.1 and MindSpore 1.5.0 + # to specify Python and MindSpore version, taking Python 3.9 and MindSpore 1.5.0 as examples, use the following manners # PYTHON_VERSION=3.9 CUDA_VERSION=10.1 MINDSPORE_VERSION=1.5.0 bash -i ./ubuntu-gpu-pip.sh ``` This script performs the following operations: - - Change the source list to HUAWEI CLOUD source. - - Install the dependencies required by MindSpore, such as GCC, gmp. + - Change the software source configuration to a HUAWEI CLOUD source. + - Install the dependencies required by MindSpore, such as GCC and gmp. - Install Python3 and pip3 via APT and set them as default. - Download and install CUDA and cuDNN. - Install MindSpore GPU by pip. @@ -51,14 +51,14 @@ The following table lists the system environment and third-party dependencies re |software|version|description| |-|-|-| -|Ubuntu|18.04|OS for running MindSpore| +|Ubuntu|18.04|OS for compiling and running MindSpore| |[CUDA](#installing-cuda)|10.1 or 11.1|parallel computing architecture for MindSpore GPU| |[cuDNN](#installing-cudnn)|7.6.x or 8.0.x|deep neural network acceleration library used by MindSpore GPU| |[Python](#installing-python)|3.7.5 or 3.9.0|Python environment that MindSpore depends on| |[GCC](#installing-gcc-and-gmp)|7.3.0~9.4.0|C++ compiler for compiling MindSpore| |[gmp](#installing-gcc-and-gmp)|6.1.2|multiple precision arithmetic library used by MindSpore| |[Open MPI](#installing-open-mpi-optional)|4.0.3|high performance message passing library used by MindSpore (optional, required for single-node/multi-GPU and multi-node/multi-GPU training)| -|[TensorRT](#installing-tensorrt-optional)|7.2.2|high performance deep learning inference SDK used by MindSpore(optional, required for serving inference)| +|[TensorRT](#installing-tensorrt-optional)|7.2.2|high performance deep learning inference SDK used by MindSpore (optional, required for serving inference)| The following describes how to install the third-party dependencies. @@ -125,6 +125,8 @@ If a different version of CUDA have been installed or the CUDA installation path conda init bash ``` + After the installation is complete, you can set up Tsinghua source acceleration download for Conda, and see [here](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/). + Create a Python 3.7.5 environment: ```bash @@ -187,7 +189,7 @@ sudo apt-get install gcc-9 -y ### Installing Open MPI (optional) -You may compile and install [Open MPI](https://www.open-mpi.org/) by the following command. +You may compile and install Open MPI by the following command. ```bash curl -O https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz @@ -204,7 +206,7 @@ cd - ### Installing TensorRT (optional) -After completing the installation of CUDA and cuDNN, download TensorRT 7.2.2 for CUDA 11.1 from [TensorRT download page](https://developer.nvidia.com/nvidia-tensorrt-7x-download), and note to download installation package in TAR format. Suppose the downloaded file is named `TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz`. Install TensorRT with the following command. +After completing the installation of CUDA and cuDNN, download TensorRT 7.2.2 for CUDA 11.1 from [TensorRT download page](https://developer.nvidia.com/nvidia-tensorrt-7x-download), and note to download installation package in TAR format. Suppose the downloaded file is named `TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz`, install TensorRT with the following command. ```bash tar xzf TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz @@ -217,13 +219,13 @@ cd - ## Installing MindSpore -First, refer to [Version List](https://www.mindspore.cn/versions) to select the version of MindSpore you want to install, and perform SHA-256 integrity check. Take version 1.6.0 as an example, execute the following commands. +First, refer to [Version List](https://www.mindspore.cn/versions) to select the version of MindSpore you want to install, and perform SHA-256 integrity check. Taking the version 1.6.0 as an example, execute the following commands. ```bash export MS_VERSION=1.6.0 ``` -Then run the following commands to install MindSpore according to the CUDA version and Python version. +Then install the latest version of MindSpore according to the CUDA version and Python version by following the following command. ```bash # CUDA10.1 + Python3.7 @@ -269,7 +271,7 @@ y = Tensor(np.ones([1,3,3,4]).astype(np.float32)) print(ops.add(x, y)) ``` -- The outputs should be the same as: +The outputs should be the same as: ```text [[[[2. 2. 2. 2.] @@ -289,7 +291,7 @@ It means MindSpore has been installed successfully. ## Version Update -Using the following command if you need to update the MindSpore version: +Use the following command if you need to update the MindSpore version: ```bash pip install --upgrade mindspore-gpu=={version} @@ -297,6 +299,6 @@ pip install --upgrade mindspore-gpu=={version} Of which, -- When updating to a release candidate (rc) version, `{version}` should be specified, e.g. 1.5.0rc1; When updating to a standard release, `=={version}` could be removed. +- When updating to a release candidate (rc) version, `{version}` should be specified manually, e.g. 1.5.0rc1; When updating to a standard release, `=={version}` could be removed. Note: MindSpore with CUDA11 is selected by default when upgrading version 1.3.0 and above. If you still want to use MindSpore with CUDA10, please select the corresponding wheel installation package. diff --git a/install/mindspore_gpu_install_source_en.md b/install/mindspore_gpu_install_source_en.md index 502133314b..5c204e4dc7 100644 --- a/install/mindspore_gpu_install_source_en.md +++ b/install/mindspore_gpu_install_source_en.md @@ -30,19 +30,19 @@ This document describes how to quickly install MindSpore by source code in a Lin - If you want to configure an environment that can compile MindSpore on a fresh Ubuntu 18.04 with a GPU environment, you may use [automatic installation script](https://gitee.com/mindspore/mindspore/raw/master/scripts/install/ubuntu-gpu-source.sh) for one-click configuration. The automatic installation script will install the dependencies required to compile MindSpore. - The root permission is required because the script will modify the source list and install dependencies via APT. Run the following command to obtain and run the automatic installation script: + The root permission is required because the automatic installation script needs to change the software source configuration and install dependencies via APT. Run the following command to obtain and run the automatic installation script: ```bash wget https://gitee.com/mindspore/mindspore/raw/master/scripts/install/ubuntu-gpu-source.sh # install Python 3.7 and CUDA 11.1 by default bash -i ./ubuntu-gpu-source.sh - # to install Python 3.9, CUDA 10.1 and optional dependencies Open MPI + # to specify Python 3.9 and CUDA 10.1, and the installation optionally relying on Open MPI, use the following manners # PYTHON_VERSION=3.9 CUDA_VERSION=10.1 OPENMPI=on bash -i ./ubuntu-gpu-source.sh ``` This script performs the following operations: - - Change the source list to HUAWEI CLOUD source. + - Change the software source configuration to a HUAWEI CLOUD source - Install the compilation dependencies required by MindSpore, such as GCC, CMake, etc. - Install Python3 and pip3 via APT and set them as default. - Download and install CUDA and cuDNN. @@ -65,10 +65,10 @@ The following table lists the system environment and third-party dependencies re |[setuptools](#installing-wheel-and-setuptools)|44.0 or later|Python package management tool used by MindSpore| |[GCC](#installing-gcc-git-and-other-dependencies)|7.3.0~9.4.0|C++ compiler for compiling MindSpore| |[git](#installing-gcc-git-and-other-dependencies)|-|source code management tools used by MindSpore| -|[CMake](#installing-cmake)|3.18.3 or later|build tools for MindSpore| -|[Autoconf](#installing-gcc-git-and-other-dependencies)|2.69 or later|build tools for MindSpore| -|[Libtool](#installing-gcc-git-and-other-dependencies)|2.4.6-29.fc30 or later|build tools for MindSpore| -|[Automake](#installing-gcc-git-and-other-dependencies)|1.15.1 or later|build tools for MindSpore| +|[CMake](#installing-cmake)|3.18.3 or later|Compilation tool that builds MindSpore| +|[Autoconf](#installing-gcc-git-and-other-dependencies)|2.69 or later|Compilation tool that builds MindSpore| +|[Libtool](#installing-gcc-git-and-other-dependencies)|2.4.6-29.fc30 or later|Compilation tool that builds MindSpore| +|[Automake](#installing-gcc-git-and-other-dependencies)|1.15.1 or later|Compilation tool that builds MindSpore| |[gmp](#installing-gcc-git-and-other-dependencies)|6.1.2|multiple precision arithmetic library used by MindSpore| |[Flex](#installing-gcc-git-and-other-dependencies)|2.5.35 or later|lexical analyzer used by MindSpore| |[tclsh](#installing-gcc-git-and-other-dependencies)|-|sqlite compilation dependencies for MindSpore| @@ -143,6 +143,8 @@ If a different version of CUDA have been installed or the CUDA installation path conda init bash ``` + After the installation is complete, you can set up Tsinghua source acceleration download for Conda, and see [here](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/). + Create a Python 3.7.5 environment: ```bash @@ -271,7 +273,7 @@ git clone https://gitee.com/mindspore/mindspore.git ## Compiling MindSpore -Go to the root directory of mindspore, then run the build script. +Go to the root directory of MindSpore, then run the build script. ```bash cd mindspore @@ -323,7 +325,7 @@ y = Tensor(np.ones([1,3,3,4]).astype(np.float32)) print(ops.add(x, y)) ``` -- The outputs should be the same as: +The outputs should be the same as: ```text [[[[2. 2. 2. 2.] @@ -345,7 +347,7 @@ It means MindSpore has been installed successfully. Using the following command if you need to update the MindSpore version. -- Update online +- Update online directly ```bash pip install --upgrade mindspore-gpu @@ -355,7 +357,7 @@ Using the following command if you need to update the MindSpore version. - Update after source code compilation - After successfully executing the compile script `build.sh` in the root path of the source code, find the whl package in path `output`, use the following command to update your version. + After successfully executing the compile script `build.sh` in the source code root directory, find the .whl package generated by compilation in directory `output`, and use the following command to update your version. ```bash pip install --upgrade mindspore_gpu-*.whl -- Gitee