硬件准备:
8g以上显存的显卡(3060Ti以上)、16g以上内存、cpu是x86_64架构且支持avx2指令集、电源500w以上、1T的磁盘
free -g看内存
cat /proc/cpuinfo | grep avx2查指令集
资源准备
磁盘扩容
我扩大根目录
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
docker及compose安装
将rongqi目录上传到根目录(/)
准备install.sh,运行
install.sh的内容如下
echo "1.install nvidia-container-runtime ..."
sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey |
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list |
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get -y install nvidia-container-runtime
which nvidia-container-runtime-hookecho "2.install docker ..."
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"sudo apt-get -y update
sudo apt-get -y install docker-ce
sudo docker -vecho "3.install docker-compose ..."
sudo cp /rongqi/docker/docker-compose /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo docker-compose -vecho "5.set docker daemon.json file ..."
sudo cat > /etc/docker/daemon.json <<EOF
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com"
]
}
EOF
显卡驱动及cuda安装
rongqi目录上一步已经给大家上传了
#安装显卡驱动
sudo apt-get update
sudo apt-get install gcc
sudo apt-get install make
cp /rongqi/xianka/NVIDIA-Linux-x86_64-535.98.run /home/自己的用户目录/NVIDIA-Linux-x86_64-535.98.run
sudo sh NVIDIA-Linux-x86_64-535.98.run
nvidia-smi
sudo apt purge nvidia-driver*
sudo apt install nvidia-driver-535
cp /rongqi/xianka/cuda_12.2.1_535.86.10_linux.run /home/自己的用户目录/cuda_12.2.1_535.86.10_linux.run
sudo sh cuda_12.2.1_535.86.10_linux.run --silent --toolkit
sudo sh cuda_12.2.1_535.86.10_linux.run
nvcc -V
镜像文件准备
rongqi/jingxiang,然后用docker 加载就行了
挂载文件准备
rongqi/ttsGuazai