ARTICLE DETAIL

资讯详情

深耕商务建站与企业官网运营的一线实战洞察。

alma8.10/anolis8.10中使用gcc13并安装vllm

alma8.10/anolis8.10中使用gcc13并安装vllm 其实初衷是想在alma中使用vllm。但是安装编译时提示出错因为alma中是安装的gcc8.4所以要想办法解决这个问题。1、此版本不能再使用crb了这个已经弃用了使用powertools。dnf config-manager --set-enabled powertools2、尝试安装dnfinstallgcc-toolset-13-gcc gcc-toolset-13-gcc-c3、激活环境sclenablegcc-toolset-13bash4、版本已经正确了(base)[rootlocalhost yum.repos.d]# gcc --versiongcc(GCC)13.3.120240611(Red Hat13.3.1-2)Copyright(C)2023Free Software Foundation, Inc. This isfreesoftware;see thesourceforcopying conditions. There is NO warranty;not evenforMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.5、登录生效echosource /opt/rh/gcc-toolset-13/enable~/.bashrcsource~/.bashrc6、继续安装vllm0.17.1如下是在anolis8.10中安装。我的环境死活直接用命令安装安装不好。就是这个命令pipinstallvllm[cuda13x]0.17.1 或者 pipinstallvllm0.17.1 --extra-index-url https://download.pytorch.org/whl/cu131-ihttps://pypi.tuna.tsinghua.edu.cn/simple干脆编译吧。首先。安装好cuda130/cuda131、python3.10。后来看资料说python是3.10、3.11、3.12应该都可以。(vllm)[rootlocalhost vllm]# nvcc -Vnvcc: NVIDIA(R)Cuda compiler driver Copyright(c)2005-2025 NVIDIA Corporation Built on Wed_Aug_20_01:58:59_PM_PDT_2025 Cuda compilation tools, release13.0, V13.0.88 Build cuda_13.0.r13.0/compiler.36424714_0系统级依赖yuminstall-ygcc-c cmakemakegitninja-buildwget升级 Python 构建工具pipinstall--upgradepip setuptools wheelvllm 核心依赖pipinstalltransformers4.39.0 sentencepiece psutil py-cpuinfo ninja克隆 vllm 源码gitclone https://github.com/vllm-project/vllm.gitcdvllm切换到 0.17.1 版本稳定适配 CUDA 13.xgitcheckout v0.17.1环境验证importvllmimporttorch# 核心信息校验print(fvllm 版本:{vllm.__version__})# 输出 0.17.1print(fCUDA 可用:{torch.cuda.is_available()})# 输出 Trueprint(fCUDA 版本:{torch.version.cuda})# 输出 13.1兼容 13.0print(fnvcc 路径:{torch.utils.cpp_extension.CUDA_HOME})# 输出 /usr/local/cuda-13.0配置 CUDA 13.0 环境变量exportCUDA_HOME/usr/local/cuda-13.0exportPATH$CUDA_HOME/bin:$PATHexportLD_LIBRARY_PATH$CUDA_HOME/lib64:$LD_LIBRARY_PATH强制指定 CUDA 编译器编译并安装CMAKE_ARGS-DCMAKE_CUDA_COMPILER${CUDA_HOME}/bin/nvcc -DLLAMA_CUBLASon\pipinstall.--no-cache-dir --force-reinstall等等就行了。8、更新版的vllm比如0.27.0如果安装需要使用rust环境不然编译版的会一直不通过安装命令RUSTUP_DIST_SERVERhttps://mirrors.tuna.tsinghua.edu.cn/rustupcurl--protohttps--tlsv1.2-sSfhttps://sh.rustup.rs|sh9、rpm版nvidia-driver安装例子当前使用时还要设置nouveau 开源驱动等一系列的事。rpm-ivhnvidia-driver-local-repo-rhel8-610.57.04-1.0-1.x86_64.rpm dnfinstall-ynvidia-driver10、rpm版cudnn安装例子rpm-icudnn-local-repo-rhel8-9.23.2-1.0-1.x86_64.rpm#安装cuda12的与你的cuda要配套dnf-yinstallcudnn9-cuda-12#安装cuda13的版本与你的cuda要配套dnf-yinstallcudnn9-cuda-13
返回列表
PREV
查看更多资讯
NEXT
返回资讯列表