在Debian11安装Proxmox VE 7及设置GPU工作环境

我们在测试大模型,深度学习的过程中,可能遇到的情况就是不断的清空系统,避免老系统中安装的软件对测试系统造成影响,导致测试结果不准确或莫名报错。今天为小伙伴们介绍使用PVE7做成一个人工智能开发和测试的平台,你可以在这个平台上任意设置虚拟机进行测试,可以对已经测试过的系统进行备份,随时还原原系统状态。

*你可以将人工智能初始状态的虚拟机做成模板,需要测试时可以由模板迅速搭建测试系统。

*已经完成测试的模型,你可以把他生成模板,或进行克隆、备份等操作,需要使用时可迅速还原你需要的状态。

演示系统配置

1、操作系统debian11.5

2、E5-2696V4 2颗,128GB DDR3

3、GPU  2片24G Nvidia P40 水冷。

一:安装GPU

1、安装Debian操作系统

2、安装编译环境

#更新系统
sudo apt update

#安装gcc和g++
sudo apt update
sudo apt install gcc g++

#查看版本
gcc --version
g++ --version

#安装make,下面两个分别安装哦
sudo apt install make 
sudo apt install make-guile

#查看make版本
make -v

3、安装依赖并关闭nouveau的控制

#安装依赖
apt install pkg-config
apt install linux-headers*

#关闭nouveau的控制
$sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

完成上面安装后重启服务器

4、安装Nvidia驱动程序

Nvidia驱动下载:官方驱动 | NVIDIA

 

#卸载旧的linux驱动
apt-get purge nvidia*

#上传官网nvidia驱动,并进入驱动所在路径,赋予执行权限,并执行安装命令
chmod +x NVIDIA-Linux-x86_64-535.86.05.run
./NVIDIA-Linux-x86_64-535.86.05.run

执行nvidia-smi来确认GPU是否正确安装

二:安装PVE7

1、修改机器名及解析

vim /etc/hostname

修改你希望的机器名,例如将服务器名设置为:debian

2、修改hosts文件

vim /etc/hosts

127.0.0.1         localhost
192.168.29.25     debian

3、修改国内源

#先备份一下
cp /etc/apt/sources.list /etc/apt/sources.list.bak

#编辑sources.lits
vim /etc/apt/sources.list

#修改内容如下:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

4、添加PVE存储库

echo "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list

5、添加PVE存储库密钥

wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg

6、更新存储库和系统

apt update && apt full-upgrade

7、安装PVE

apt install proxmox-ve postfix open-iscsi

8、安装完成后删除不必要的prober文件

apt remove os-prober

然后重启服务器

三:登录PVE

1、登录方式

https://192.168.29.25:8006

注意这里的IP地址是你服务器的地址,请根据实际情况填写。

语言可以选择中文,方便阅读。

2、为虚拟机添加GPU显卡

先创建一个虚拟机,然后向虚拟机添加GPU卡:

在设备中找到P40显卡

将上面三项打勾,然后确定【OK】

3、使用MDev,请参考上一篇文章,PVE 7.4-17 中开启vGPU显卡虚拟化-CSDN博客

  • 17
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

BBM的开源HUB

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值