Requirements for Online Download
To download the driver, firmware, and CANN software packages of versions earlier than 6.0.RC1 online, ensure that the following requirements are met (before installing the software, ensure that the software and versions meet the security requirements of your organization):
- The OS must be Windows or Ubuntu 18.04.1/5. Note that the path for storing the ascend-deployer tool cannot contain Chinese characters.
- You can access support.huawei.com using the Firefox browser. You can download the Firefox installation package from the Firefox official website or use the package manager provided by the system to install the Firefox browser.
- You need to prepare an account for logging in to the support website and apply for and confirm the permission to download software packages (driver and firmware packages, CANN software package, and toolbox software package) in advance. You can apply for the permission by clicking the URL in the ascend-deployer/downloader/software/CANN_*.json file.
- You need to place the obtained geckodriver package in a directory at the same level as the ascend-deployer directory. For Linux, ensure that the owner group name of the geckodriver is the same as the current user name and the permission is 500. For the Windows OS, ensure that other users do not have the read and write permissions. You can obtain the geckodriver package as follows:
- Windows: Visit https://github.com/mozilla/geckodriver/releases, obtain geckodriver-vx.x.x-win64.zip, and decompress it to obtain geckodriver.exe.
- Ubuntu x86_64: Visit https://github.com/mozilla/geckodriver/releases, obtain geckodriver-vx.x.x-linux64.tar.gz, and decompress it to obtain the geckodriver.
- Ubuntu AArch64: Perform the following operations to obtain the geckodriver software package and decompress it to obtain the geckodriver:Download the firefox-geckodriver_<version>ubuntu0.18.04.1_arm64.deb package from the image source and upload it to the server. Perform the following operations to decompress the package to obtain the geckodriver:
dpkg -x firefox-geckodriver_<version>ubuntu0.18.04.1_arm64.deb . # Decompresses the software package to the current directory. After the decompression, the usr directory is generated. ls usr/bin/geckodriver # Check the generated usr/bin/geckodriver file. After the geckodriver file is obtained, clear the temporary files.
- You need to use pip3 to install selenium (pip3 install selenium) in advance. If pip3 is unavailable, install it by yourself.
- In Linux, you need to run the following commands in the ascend-deployer directory to enable ports and harden file permissions. If the patch tool is unavailable, install it first.
patch <Directory of the third-party package that Python 3 uses>/selenium/webdriver/firefox/webdriver.py < <ascend-deployer directory>/patch/selenium_firefox.patch
patch <Directory of the third-party package that Python 3 uses>/selenium/webdriver/firefox/firefox_profile.py < <ascend-deployer directory>/patch/selenium_firefox_profile.patch
- In Linux, for security purposes, you need to run the following commands as the root user to disable connections of other users:
iptables -A OUTPUT -m owner ! --uid-owner current username -o lo -p tcp --dport 56003 -j REJECT ip6tables -A OUTPUT -m owner ! --uid-owner current username -o lo -p tcp --dport 56003 -j REJECT iptables -A OUTPUT -m owner ! --uid-owner current username -o lo -p tcp --dport 56004 -j REJECT ip6tables -A OUTPUT -m owner ! --uid-owner current username -o lo -p tcp --dport 56004 -j REJECT
After the installation is complete, run the following command to cancel the preceding configuration.
- Query the existing rules.
iptables -L OUTPUT --line-number
- Find the line number of the added rule and run the following command to cancel the configuration:
iptables -D OUTPUT num
In the preceding command, replace num with the actual value, for example, 1.
- Query the existing rules.
- After the software package is downloaded, verify its PGP digital signature according to OpenPGP Signature Verification Guide to ensure that the software package is not tampered with. If the verification fails, do not use the software package, and contact Huawei technical support engineers.