Sengsheng CANN is a heterogeneous computing architecture for AI scenarios developed by Huawei, which enables users to quickly build AI applications and businesses based on Sengsheng platform.
This article describes the process of manually deploying the development environment (separate from the runtime environment) on Ubuntu to install MindStudio.
Note: It can also be passed
msInstallerTools are installed automatically. However, during the practice of this article, the installation service encountered an interruption problem. Therefore, the manual installation method is given.
Basic instructions
Requirements:
- Ubuntu 18.04 x86
Non-ascendant devices: can only be used for code development, compilation and other pure development activities that do not rely on ascendant chips.
Separate deployment of development and run environments:
Get the package
-
Software packages (reasoning)
- Ascend – cann – toolkit_5. 0.2 alpha003_linux – x86_64. Run
- Ascend – cann – toolkit_5. 0.2 alpha003_linux – aarch64. Run
- MindStudio_3. 0.1 _linux. Tar. Gz
Download page, Chinese and English versions may be different.
Configure the user (optional)
This section is required if the user is not root, otherwise ignore it.
Create user (non-root) :
GroupAdd HwHiAiUser useradd-g hwhiaiuser-d /home/hwhiaiuser-m hwhiaiuser-s /bin/bash passwd /etc/sudoers vi /etc/sudoers # User privilege specification HwHiAiUser ALL=(ALL:ALL) ALL Chmod u-w /etc/sudoers # Switch user su HwHiAiUser
Install dependencies
sudo apt update sudo apt-get install -y gcc g++ make cmake zlib1g zlib1g-dev libsqlite3-dev openssl libssl-dev libffi-dev unzip pciutils net-tools libblas-dev gfortran libblas3 libopenblas-dev wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz tar ZXVF Python - 3.7.5. TGZ CD Python - 3.7.5. / configure --prefix=$HOME/python3.7.5 --enable-loadable-sqlite-extensions --enable-shared make-j 'nproc' make install sudo cp $HOME/python3.7.5 / lib/libpython3.7 Margaret spellings o. 1.0 / usr/lib sudo ln -s $HOME/python3.7.5 / bin/python3 / usr/bin/python3.7 sudo ln - s $HOME/python3.7.5 / bin/pip3 / usr/bin/pip3.7 sudo ln -s $HOME/python3.7.5 / bin/python3 / usr/bin/python3.7.5 sudo ln -s $HOME/python3.7.5 / bin/pip3 / usr/bin/pip3.7.5 sudo ln -s $HOME/python3.7.5 / bin/pip3 / usr/bin/pip3 sudo ln -s $HOME/python3.7.5 / lib/python3.7 / usr/lib/python3.7 pip3.7.5 config set global. The index - a url https://mirrors.aliyun.com/pypi/simple/ pip3.7.5 install attrs psutil decorator numpy protobuf = = 3.11.3 scipy sympy cffi
Installation Development Kit
$chmod +x scend-cann-toolkit_5.0.0.alpha003_linux-x86_64.run $./ scend-cann-toolkit_5.0.0.alpha003_linux-x86_64.run $ --install Verifying archive integrity... 100% SHA256 checksums are OK. All good. Uncompressing ASCEND_RUN_PACKAGE 100% [Toolkit] [20210610-20:42:05] [INFO] LogFile:/home/HwHiAiUser/var/log/ascend_seclog/ascend_toolkit_install.log [Toolkit] [20210610-20:42:05] [INFO] install start [Toolkit] [20210610-20:42:05] [INFO] The install path is /home/HwHiAiUser/Ascend ! [Toolkit] [20210610-20:42:05] [WARNING] driver package maybe not installed [Toolkit] [20210610-20:42:05] [WARNING] driver package maybe not installed [Toolkit] [20210610-20:42:05] [INFO] install package ASCEND - ACLLIB-1.78.T20.0.B200-LINUX86_64. RUN START [TOOLKIT] [20210610-20:42:08] [INFO] Scend-acllib-1.78.t20.0.b200 -linux.x86_64. Run --devel --quiet --nox11 install success [Toolkit] [20210610-20:42:08] [INFO] Install package scend-pyacl-3.3.0.alpha003-linux.x86_64. Run Start [Toolkit] [20210610-20:42:08] [INFO] Scend-pyacl-3.3.0.alpha003-linux.x86_64. run --devel --quiet --nox11 install success [Toolkit] [20210610-20:42:08] [INFO] Install Package Ascend- ATC-1.78.T20.0.B200-Linux.x86_64. Run Start [Toolkit] [20210610-20:42:41] [INFO] Scend-atc-1.78.t20.0.b200 -linux.x86_64.run --devel --pylocal --quiet --nox11 install success [Toolkit] [20210610-20:42:41] [INFO] Install package scend-opp-1.78.T20.0.B200-linux.x86_64. Run Start [Toolkit] [20210610-20:43:11] [INFO] Ascend-opp-1.78.t20.0.b200-linux.x86_64. Run --devel --quiet --nox11 install success [Toolkit] [20210610-20:43:11] [INFO] Install Package Ascend- Toolkit - 1.78.T20.0.B200-Linux.x86_64. Run Start [Toolkit] [20210610-20:44:11] [INFO] Ascend- Toolkit-1.78.t20.0.b200 -linux.x86_64. Run --devel --pylocal --quiet --nox11 install Success [Toolkit] [20210610-20:44:11] [INFO] install package ASCEND310-AICPU_Kernels - 1.78.T20.0.b200. Run Start [Toolkit] [20210610-20:44:12] [INFO] ASCEND310-AICPU_KERNEL -1.78.t20.0.b200.run --devel --quiet --nox11 install success [Toolkit] [20210610-20:44:12] [INFO] Install package ASCEND910-AICPU_Kernels - 1.78.T20.0.B200. Run Start [Toolkit] [20210610-20:44:13] [INFO] ASCEND910-AICPU_KERNEL -1.78.t20.0.b200.run --devel --quiet --nox11 install success [Toolkit] [20210610-20:44:13] [INFO] Install package ASCEND310-AICPU_KERNELS_MINIRC-1.78.T20.0.B200. Run Start [Toolkit] [20210610-20:44:14] [INFO] ascend310-aicpu_kernels_minirc-1.78.t20.0.b200. Run --devel --quiet --nox11 install success [Toolkit] [20210610-20:44:14] [INFO] /home/HwHiAiUser/Ascend/ascend_cann_install.info generate success [Toolkit] [20210610-20:44:14] [INFO] Please make sure that: Offline infer develop (cannot coexist with other scenes): LD_LIBRARY_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/acllib/lib64: PYTHONPATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/pyACL/python/site-packages/acl: /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit/python/site-packages: ASCEND_AICPU_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest: ASCEND_OPP_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/opp: TOOLCHAIN_HOME includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit: Third party AI framework develop (cannot coexist with other scenes): PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/fwkacllib/ccec_compiler/bin: /home/HwHiAiUser/Ascend/ascend-toolkit/latest/fwkacllib/bin: LD_LIBRARY_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/fwkacllib/lib64: PYTHONPATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/fwkacllib/python/site-packages: /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit/python/site-packages: ASCEND_OPP_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/opp: ASCEND_AICPU_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest: TOOLCHAIN_HOME includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit: Model transformation and operator develop (cannot coexist with other scenes): PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/atc/ccec_compiler/bin: /home/HwHiAiUser/Ascend/ascend-toolkit/latest/atc/bin: LD_LIBRARY_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/atc/lib64: PYTHONPATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/atc/python/site-packages: /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit/python/site-packages: ASCEND_OPP_PATH includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/opp: TOOLCHAIN_HOME includes : /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit: [Toolkit] [20210610-20:44:15] [INFO] Ascend-Cann-Toolkit_5.0.2. Alpha003_linux-x86_64. Run install success,The install path is /home/HwHiAiUser/Ascend !
$chmod +x scend-cann-toolkit_5.0.0.alpha003_linux-aarch64.run $./ scend-cann-toolkit_5.0.0.alpha003_linux-aarch64.run $ --install Verifying archive integrity... 100% SHA256 checksums are OK. All good. Uncompressing ASCEND_RUN_PACKAGE 100% [Toolkit] [20210610-20:46:27] [INFO] LogFile:/home/HwHiAiUser/var/log/ascend_seclog/ascend_toolkit_install.log [Toolkit] [20210610-20:46:27] [INFO] install start [Toolkit] [20210610-20:46:27] [INFO] The install path is /home/HwHiAiUser/Ascend ! [Toolkit] [20210610-20:46:27] [WARNING] driver package maybe not installed [Toolkit] [20210610-20:46:27] [WARNING] driver package maybe not installed [Toolkit] [20210610-20:46:27] [INFO] The current OS is x86_64 [Toolkit] [20210610-20:46:27] [INFO] Install package scend-acllib-1.78.t20.0.b200-linux.aarch64. Run Start [Toolkit] [20210610-20:46:29] [INFO] Ascend-acllibe-1.78.t20.0.b200 -linux.aarch64.run --devel --quiet --nox11 install success [Toolkit] [20210610-20:46:29] [INFO] Install package ASCEND310-AICPU_Kernels - 1.78.T20.0.B200. Run Start [Toolkit] [20210610-20:46:31] [INFO] ASCEND310-AICPU_Kernels -1.78.t20.0.b200.run --devel --quiet --nox11 install success [Toolkit] [20210610-20:46:31] [INFO] Install package ASCEND310-AICPU_KERNELS_MINIRC-1.78.T20.0.B200. Run Start [Toolkit] [20210610-20:46:32] [INFO] ascend310-aicpu_kernels_minirc-1.78.t20.0.b200. Run --devel --quiet --nox11 install success [Toolkit] [20210610-20:46:32] [INFO] Ascend-Cann-Toolkit_5.0.2. Alpha003_linux-aarch64. Run install success,The install path is /home/HwHiAiUser/Ascend !
Create a Docker image (optional)
Docker pull ubuntu: 18.04 the cat < < - EOF > Dockerfile # syntax = docker/Dockerfile: experimental FROM ubuntu: 18.04 ARG ASCEND_DIR=./ Ascend #./ Ascend # Ascend_CANN-Toolkit_5.0.2. alpha003_linux-x86_64.run # Ascend-cann-Toolkit_5.0.2.alpha003_linux-aarch64. run # python-3.7.5. TGZ COPY \${ASCEND_DIR} / scend run apt-get update \\ && apt-get install -y gcc g++ make cmake zlib1g zlib1g-dev libsqlite3-dev \\ openssl libssl-dev libffi-dev unzip Pciutils net-tools \\ && rm-rf /var/lib/apt/lists/* RUN CD/scend \\ && tar-zxvf Python-3.7.5.tgz \\ && CD Python-3.7.5 \\ &&. /configure --prefix=/usr/local/python3.7.5 \\ --enable-loadable-sqlite-extensions --enable-shared \ && make -j \ $(nproc) && make install \ \ & cp/usr/local/python3.7.5 / lib/libpython3.7 Margaret spellings o. 1.0 / usr/lib \ \ && ln -s / usr/local/python3.7.5 / bin/python3 / usr/bin/python3 \ \ && ln -s/usr/local/python3.7.5 / bin/pip3 / usr/bin/pip3 \ \ && ln - s/usr/local/python3.7.5 / bin/python3 / usr/bin/python3.7 \ \ && ln -s/usr/local/python3.7.5 / bin/pip3 / usr/bin/pip3.7 \ \ && ln -s/usr/local/python3.7.5 / bin/python3 / usr/bin/python3.7.5 \ \ && ln -s/usr/local/python3.7.5 / bin/pip3 /usr/bin/pip3.7.5 \\ && pip3.7.5 install attrs psutil decorator numpy protobuf==3.11.3 Scipy Sympy\ cffi-i https://mirrors.aliyun.com/pypi/simple/ \ \ & rm - r/ascend/Python - 3.7.5 RUN CD/ascend \ \ && chmod + x *. RUN \ \ && ./ scend-cann-toolkit_5.0.2.alpha003_linux-x86_64.run \\ --install-username=root --install-usergroup=root --install \ &&. / scend-cann-toolkit_5.0.2.alpha003_linux-aarch64.run \\ --install-username=root --install-usergroup=root --install RUN echo '\nawk "/Please make sure that:/,/chmod_authority/" /var/log/ascend_seclog/ascend_toolkit_install.log' >> / root/bashrc CMD/"/bin/bash "EOF docker build \ -t ascend/cann: 5.0.2. Alpha003 \ - build - arg ASCEND_DIR. = / ascend \ - f . / Dockerfile. Docker run - it - rm ascend/cann: 5.0.2. Alpha003
Install MindStudio
The tar XZVF MindStudio_3. 0.1 _linux. Tar. Gz - C $HOME sudo ln -s $HOME/MindStudio/bin/MindStudio. Sh/usr/local/bin/MindStudio
When running MindStudio for the first time, if the prompt dependency is missing, run the prompt command installation:
$ MindStudio Checking MindStudio environment dependencies... Success Checking Python environment dependencies... Success Some dependencies are missing. Execute the following command first: Sudo apt - get - y install xterm fonts -- wqy zenhei fonts -- wqy microhei && / home/HwHiAiUser python3.7.5 / bin/pip3 install --user grpcio coverage gnureadline pylint matplotlib requests pandas xlrd absl-py
In addition, you need to install the JDK:
sudo apt-get -y install openjdk-8-jdk
Finally, MindStudio is up and running.
Configuration MindStudio
First prompt import Settings:
Select not to import OK. If you have previously set, can set a path, such as: $HOME/config/Huawei/MindStudioMS – 3.0.
Then select the development kit path:
Since then, the user experience has improved:
Finally, enter the homepage of MindStudio:
reference
- Ascend
- Rising CANN
Gocoding personal practice experience sharing, can pay attention to the public number!