# docs **Repository Path**: shaw_zhang/docs ## Basic Information - **Project Name**: docs - **Description**: MindSpore document - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://www.mindspore.cn - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1043 - **Created**: 2022-09-27 - **Last Updated**: 2022-12-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MindSpore Documents ![MindSpore Logo](resource/MindSpore-logo.png) [查看中文](./README_CN.md#) ## Overview This project provides the source files of the installation guide, tutorials, and other documents, as well as API configurations on the MindSpore official website . ## Contributions You are welcome to contribute documents. If you want to contribute documents, read the [CONTRIBUTING_DOC.md](./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. ## Directory Structure Description ```text 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 | | | ├───mindinsight // MindInsight Documents | | | ├───mindquantum // MindQuantum Documents | | | ├───mindscience // MindScience Documents | | | ├───mindspore // MindSpore Documents | | | ├───notebook // Experiential Documents | | | ├───probability // MindSpore Probability Documents | | | ├───reinforcement // MindSpore Reinforcement Documents | | | ├───sample_code // Document corresponding sample code | | | ├───serving // MindSpore Serving Documents | | | ├───vision // MindSpore Vision Documents | | | └───xai // MindSpore XAI Documents | │───install // Installation instruction | │───resource // Resource related documents | │───tools // Automation tool | │───tutorials // MindSpore tutorial related documents | │───CONTRIBUTING_DOC.md // Contributing Documents | └───README.md // Docs repository description ``` ## Document Construction MindSpore tutorials and API documentation can be generated by the [Sphinx](https://www.sphinx-doc.org/en/master/) 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. 1. Use `pip` to install MindSpore module, which API documentation needs to built base on the installation, refe to [install](https://www.mindspore.cn/install). ```bash pip install mindspore-*.*.*-cp37-cp37m-linux_x86_64.whl ``` 2. Download code of the MindSpore Docs repository. ```bash git clone https://gitee.com/mindspore/docs.git ``` 3. Go to the api_python directory and install the dependency items in the requirements.txt file. ```bash cd docs/mindspore pip install -r requirements.txt ``` 4. Run the following command in the api_python directory to create the `build_en/html` directory that stores the generated document web page. You can open `build_en/html/index.html` to view the API document. ```bash make html ``` ### Note 1. 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: | Generation of the corresponding APIs | Environment variables | Repository links | Repository names | | ---- | ---- | ---- | ---- | | MindSpore/ MindSpore Lite | MS_PATH | | mindspore | | MindInsight | MI_PATH | | mindinsight | | MindArmour | MA_PATH | | mindarmour | | MindQuantum | MQ_PATH | | mindquantum | | Reinforcement | RM_PATH | | reinforcement | | Serving | SV_PATH | | serving | | Vision | VS_PATH | | vision | | Hub | HB_PATH | | hub | | XAI | XA_PATH | | xai | | Golden Stick | GS_PATH | | golden_stick | | DevToolkit | DT_PATH | | devtoolkit | | Federated | MF_PATH | | federated | | MindPandas | MP_PATH | | mindpandas | | MindScience | MSC_PATH | | mindscience | | Recommender | RD_PATH | | recommender | | Graphlearning | GL_PATH | | graphlearning | The code to clone the repositories and set the environment variables is as follows: ```bash git clone repository_link export environment_variable = corresponds_to_the_local_path_of_the_clone_repository ``` 2. 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: ```bash sudo apt install doxygen export LITE_PACKAGE_PATH = local_path_of_the_Lite_package ``` 3. When [MindSpore Tutorials](https://gitee.com/mindspore/docs/tree/master/tutorials), [MindSpore Docs](https://gitee.com/mindspore/docs/tree/master/docs/mindspore), [Deep Probability Programming Docs](https://gitee.com/mindspore/docs/tree/master/docs/probability/docs) and [MindQuantum Docs](https://gitee.com/mindspore/docs/tree/master/docs/mindquantum/docs) are built, [pandoc](https://pandoc.org/) needs to be installed. For downloading and installing pandoc, refer to 。 ## License - [Apache License 2.0](LICENSE) - [Creative Commons License version 4.0](LICENSE-CC-BY-4.0)