Skip to content

GPU 服务器安装

CUDA 下载

https://developer.nvidia.com/cuda-downloads

yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
wget https://developer.download.nvidia.com/compute/cuda/12.2.1/local_installers/cuda_12.2.1_535.86.10_linux.run
sudo sh cuda_12.2.1_535.86.10_linux.run

cuDNN下载

https://developer.download.nvidia.com/compute/redist/cudnn/v8.1.0/RHEL7_3-x64/

wget https://developer.download.nvidia.com/compute/redist/cudnn/v8.1.0/RHEL7_3-x64/libcudnn8-8.1.0.77-1.cuda11.2.x86_64.rpm
rpm -i libcudnn8-8.1.0.77-1.cuda11.2.x86_64.rpm

Git LFS安装

yum install -y git git-lfs
git lfs install

Conda安装

https://www.anaconda.com/download#downloads

wget  https://repo.anaconda.com/archive/Anaconda3-2023.07-1-Linux-x86_64.sh
sh Anaconda3-2023.07-1-Linux-x86_64.sh

修改~/.bash_profile

eval "$(/root/anaconda3/bin/conda shell.bash hook)"

创建虚拟环境

创建chatglm的虚拟环境

conda create --name chatglm python=3.10

gcc 高版本安装

yum -y install centos-release-scl
yum -y install devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
scl enable devtoolset-11 bash

cmake 安装

如果需要安装高版本cmake, 可以使用以下命令

wget https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-x86_64.sh
sh cmake-3.27.1-linux-x86_64.sh

装完后需要加入PATH