2021年4月27日 星期二

Proxmox ve 6.x LXC 安裝 cuda

查詢 host nvidia 驅動程式版本
nvidia-smi  (460.73.01)

增加 lxc 設定檔設定
lxc.cgroup.devices.allow: c 195:* rwm
lxc.cgroup.devices.allow: c 243:* rwm
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file

安裝相關工具
apt install -y sudo gnupg gnupg2 gnupg1
apt-get install -y software-properties-common

根據 host 驅動程式版本安裝 cuda
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/ /"
sudo add-apt-repository contrib
sudo apt-get update
apt-get install -y cuda-drivers=460.73.01-1
sudo apt-get -y install cuda

沒有留言: