This project provides the source files of the installation guide, tutorials, and other documents, as well as API configurations on the MindSpore official website https://www.mindspore.cn.
You are welcome to contribute documents. If you want to contribute documents, read the CONTRIBUTING_DOC.md. Please comply with the document writing specifications, and submit documents according to the process rules. After the documents are approved, the changes will be displayed in the document project and on the official website.
If you have any comments or suggestions on the documents, submit them in Issues.
docs
├───activity // Record the activity experience.
|
├───docs // Technical documents about design, specification and so on. Configuration files for API generation.
| |
| ├───devtoolkit // MindSpore Dev Toolkit Documents
| |
| ├───federated // MindSpore Federated Documents
| |
| ├───golden_stick // MindSpore Golden Stick Documents
| |
| ├───graphlearning // MindSpore Graph Learning Documents
| |
| ├───hub // MindSpore Hub Documents
| |
| ├───lite // MindSpore Lite Documents
| |
| ├───mindarmour // MindArmour Documents
| |
| ├───mindearth // MindEarth Documents
| |
| ├───mindflow // MindFlow Documents
| |
| ├───mindelec // MindElec Documents
| |
| ├───mindinsight // MindInsight Documents
| |
| ├───mindpandas // MindPandas Documents
| |
| ├───mindquantum // MindQuantum Documents
| |
| ├───mindscience // MindScience Documents
| |
| ├───mindsponge // MindSPONGE Documents
| |
| ├───mindspore // MindSpore Documents
| |
| ├───mindformers // MindSpore Transformer Documents
| |
| ├───probability // MindSpore Probability Documents
| |
| ├───recommender // MindSpore Recommender Documents
| |
| ├───reinforcement // MindSpore Reinforcement Documents
| |
| ├───sample_code // Document corresponding sample code
| |
| ├───sciai // MindSpore SciAI Documents
| |
| ├───serving // MindSpore Serving Documents
| |
| └───xai // MindSpore XAI Documents
|
│───install // Installation instruction
|
│───templates // Document templates and examples
|
│───resource // Resource related documents
|
│───tools // Automation tool
|
│───tutorials // MindSpore tutorial related documents
|
│───CONTRIBUTING_DOC.md // Contributing Documents
|
└───README.md // Docs repository description
MindSpore tutorials and API documentation can be generated by the Sphinx tool. Before building API documentation for MindSpore, MindSpore Hub, MindArmour or MindQuantum, the corresponding module must be completed installation. The following takes the MindSpore Python API document as an example to introduce the specific steps. The installation of MindSpore must be completed before the operation.
-
Use
pip
to install MindSpore module, which API documentation needs to built base on the installation, refe to install.pip install mindspore-*.*.*-cp37-cp37m-linux_x86_64.whl
-
Download code of the MindSpore Docs repository.
git clone https://gitee.com/mindspore/docs.git
-
Go to the directory where the API is located,
docs/mindspore
, and install the dependency items in the requirements.txt file.cd docs/mindspore pip install -r requirements.txt
-
Open the configuration file
Makefile
under the directorydocs/mindspore
where the API is located, and configure it according to the language in the generated documentation.SOURCEDIR
refers to the source folder andBUILDDIR
refers to the name of the folder where the documentation will be built.SOURCEDIR = source_zh_cn BUILDDIR = build_zh_cn
- To build Chinese documentation, configure
SOURCEDIR
tosource_zh_cn
andBUILDDIR
tobuild_zh_cn
. - To build the English documentation, configure
SOURCEDIR
assource_en
andBUILDDIR
asbuild_en
.
- To build Chinese documentation, configure
-
After the file
Makefile
is configured, execute the following command under the directorydocs/mindspore
where the API is located to build the documentation:make html
- Build Chinese documentation: After completion, a new
build_zh_cn/html
directory will be created, which stores the generated Chinese documentation web pages, openbuild_zh_cn/html/index.html
to view the contents of the API documentation. - Build the English documentation: After completion, a new
build_en/html
directory will be created, which stores the generated English documentation web pages, openbuild_en/html/index.html
to view the contents of the API documentation.
- Build Chinese documentation: After completion, a new
-
When APIs for different repositories such as MindSpore, MindInsight, and MindQuantum are built, the following configuration list is given for use because some resource files corresponding to different repositories are used, and the corresponding repositories need to be cloned and the environment variables are configured:
The code to clone the repositories and set the environment variables is as follows:
git clone repository_link export environment_variable = corresponds_to_the_local_path_of_the_clone_repository
-
When the API of Lite is built, Doxygen needs to be installed. Then download the latest Lite tar package, and configure the local packet path to the LITE_PACKAGE_PATH environment variable:
sudo apt install doxygen export LITE_PACKAGE_PATH = local_path_of_the_Lite_package
-
When MindSpore Tutorials, MindSpore Docs, Deep Probability Programming Docs and MindQuantum Docs are built, pandoc needs to be installed. For downloading and installing pandoc, refer to https://pandoc.org/installing.html。