Performing Required Operations After Installation
Post-installation Configuration
- After the installation is complete, you are advised to cancel the root user login and password-free login based on the actual application scenario.
- Before using Python 3.7.5, configure the following environment variables:
# Set the Python 3.7.5 library path. export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH # If multiple Python 3 versions exist in the user environment, use Python 3.7.5. export PATH=/usr/local/python3.7.5/bin:$PATH
- The Toolkit and other software provide scripts for setting process-level environment variables. You can reference the scripts in processes to automatically set environment variables. The environment variables automatically become invalid after the processes end. The default installation path of the root user is used as an example.
If a non-root user is used for installation, replace /usr/local/Ascend in the following command with ~/Ascend. An example command is as follows:
. ~/Ascend/ascend-toolkit/set_env.sh# Configure the environment variable when installing the Toolkit package. . /usr/local/Ascend/ascend-toolkit/set_env.sh # Configure the environment variable when installing the TFPlugin package. . /usr/local/Ascend/tfplugin/set_env.sh # Configure the environment variable when installing the NNRT package. . /usr/local/Ascend/nnrt/set_env.sh # Configure the environment variable when installing the NNAE package. . /usr/local/Ascend/nnae/set_env.sh # Configure the environment variable when installing the Toolbox package. . /usr/local/Ascend/toolbox/set_env.shYou can also configure permanent environment variables by modifying the ~/.bashrc file. The procedure is as follows:- Run the vi ~/.bashrc command in any directory as the running user to open the .bashrc file and append the preceding lines to the file.
- Run the :wq! command to save the file and exit.
- Run the source ~/.bashrc command for the modification to take effect immediately.
- During distributed training, configure the NIC IP address of the device. For details, see Configuring the Parameter Plane Network. If you want to configure the NIC IP addresses of devices in batches, use the device IP configuration script (ascend-deployer/ascend_deployer/tools/DeviceIP-conf.sh) provided by the ascend-deployer tool. For details, see Using the HCCN Tool.
- Configure GCC environment variables. GCC 7.3.0 or later is required for model training. You can run the gcc --version command to query the GCC version. If the GCC version is earlier than 7.3.0, perform the following steps to install GCC 7.3.0:
- Log in to the server as the root user.
- Configure environment variables as required.
export LD_LIBRARY_PATH=/usr/local/gcc7.3.0/lib64:${LD_LIBRARY_PATH} export CC=/usr/local/gcc7.3.0/bin/gcc export CXX=/usr/local/gcc7.3.0/bin/g++ export PATH=/usr/local/gcc7.3.0/bin:${PATH} - Run the gcc --version command to check the GCC version. If the following information is displayed, the configuration is successful:
gcc (GCC) 7.3.0
- During the installation, the Docker user group is created and the Docker service is started. After the installation is complete, you can uninstall third-party components that may have security risks, such as GCC, g++, and JDK, from the system.
- If you need to use GCC 7.3.0 to compile a model but the GCC version cannot be controlled using the environment variable due to user compilation script problems, perform the following operations to modify the soft link:
- Before modifying the soft link, check whether the gcc7.3.0 folder exists in the /usr/local directory on the server. If the folder does not exist, GCC 7.3.0 is not installed. In this case, skip the following steps:
- Run the following command in any directory on the server to create a soft link:
ln -sf /usr/local/gcc7.3.0/bin/gcc /usr/bin/gcc
- Run the gcc --version command to check the GCC version. If the following information is displayed, the configuration is successful:
gcc (GCC) 7.3.0