Environment Setup
Supported product models:
- Currently, only Python 3.11 is supported. For details about how to install it, visit the Python official website: https://www.python.org/. If other Python versions are used, perform adaptation by following the instructions provided in PyDFlow Compilation Guide.
- When DataFlow calls UDFs developed using Python, ensure that the g++ version is 7.x.
- Make sure that the Ascend-CANN-Toolkit has been installed. For details, see CANN Software Installation.
In the AI server scenario, the installation node should isolate the container or virtual machine, whose lifetime should be consistent with the lifetime of the service process or tenant. When the lifetime of the container or virtual machine ends, persistent data must be cleared to prevent impact on the next service process or tenant.
- Required environment variablesAfter the CANN software is installed, log in to the environment as the CANN operating user and run the source ${INSTALL_DIR}/set_env.sh command to set environment variables. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
export RESOURCE_CONFIG_PATH=numa_config.json // Specify the path for storing the heterogeneous resource description file.
The preceding environment variables take effect only in the current window. You can write the preceding commands to the ~/.bashrc file to make them take effect permanently. The method is as follows:
- Run the vi ~/.bashrc command in any directory as the installation user and append the preceding commands to the file.
- Run the :wq! command to save the file and exit.
- Run the source ~/.bashrc command to make the environment variables take effect.
Parent topic: Quick Start