Environment Configuration
Before compiling and building the source code, you need to install the dependent components of the required version.
- Install system dependencies.
1 2 3 4 5 6 7 8
dnf install -y \ --setopt=install_weak_deps=False \ --setopt=tsflags=nodocs \ git gcc gcc-c++ gfortran make cmake ninja-build \ python3 python3-pip python3-devel \ openssl-devel bzip2-devel zlib-devel xz-devel libffi-devel \ sqlite-devel readline-devel patchelf tar xz wget curl \ findutils diffutils patch which file openblas-devel lapack-devel
- Install the Python build dependencies.
1 2 3 4
python3 -m pip install --upgrade pip setuptools wheel python3 -m pip install \ numpy pybind11 Cython pyyaml packaging requests six protobuf \ typing_extensions decorator opt_einsum networkx astor gast Pillow ninja
- After installing the CUDA Toolkit and cuDNN, set the compilation environment variables. The following uses the default installation path of CUDA 13.0 as an example.
1 2 3 4 5 6
export CUDA_HOME=/usr/local/cuda-13.0 export PATH=${CUDA_HOME}/bin:${PATH} export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH:-} nvcc --version test -f ${CUDA_HOME}/include/cudnn_version.h
Parent topic: Preparations