I decided to post my notes and not necessarily a guide on getting GPU passthrough working for a
Debian LXC container with Renoir (I lazily copy and pasted my editor). This was gratuitously taken from
thex and countless others across many forums. My strategy was just plain being lazy and reflecting the outside environment (Proxmox) to the Container (Proxmox amd drivers). I hope this helps and sorry if violated any forum rules (just made an account as I finally have separate computer to act as a server).
It was tested with LXQT + x2go + x2go client and neverball which was fun (still a little choppy over the wifi network, but it worked as a proof of concept as before it was unplayable on cpu only). Another note is I don't know if
[libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all] needed to be installed in Proxmox and the container, but my logic was symmetry between the container and host. The original goal was to get a DE with accelerated graphics and sound. I didn't bother at the end as I'm too spoiled by ease of use with PopOS and Wayland even without gpu acceleration.
Sorry if there are errors in my notes. I didn't do this as a one to one process, but I tried to keep everything in a logical order. I also didn't use spellcheck.
Bash:
#For DeskMini X300 AMD Renoir 4650G Install
#PROXMOX INSTALL===== (this is for a weird tty3 bug if it won't install)
#Installed with ZFS raid 0 single disks to get systemd
chmod 1777 /tmp
apt update
apt upgrade
Xorg -configure
mv /xorg.conf.new /etc/X11/xorg.conf
nano /etc/X11/xorg.conf
#Under Section "Device"
#Under Identifier "Card1"
#Only update the Driver line ""
Driver "fbdev"
startx
#Finish install as normal
#PROXMOX=============
nano /etc/apt/sources.list
#Add no subscription repo
#Not for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
nano /etc/apt/sources.list.d/pve-enterprise.list
#Comment out enterprise repo here
apt update
apt dist-upgrade
apt install pve-kernel-5.11 pve-headers libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all
nano /etc/kernel/cmdline
#Append for Renior GPU support
amdgpu.exp_hw_support=1
pve-efiboot-tool refresh
reboot
#DEBIAN UNPRIVILIGED CONTAINER====
nano /etc/apt/sources.list
#I just replaced the contents of this file with the one on proxmox
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
apt update
apt dist-upgrade
apt install pve-firmware libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all
shutdown
#PROXMOX=============
#Add to the end of your id.conf
#cgroup device was the same as thex's
nano /etc/pve/lxc/<your container id>.conf
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.cgroup.devices.allow: c 226:128 rwm
#start your container and you're done!
The problem now is I don't need a DE in a container and I don't need Jellyfin as I don't really transcode anything.
I guess I'll be teaching myself Machine Learning? If anyone has any cool ideas for a headless GPU container let me know.
I hope this helps.