If you had to redo your self hosting setup, what would you do differently this time around?

hogofwar@lemmy.world to Selfhosted@lemmy.world – 142 points –
103

You are viewing a single comment

I already did a few months ago. My setup was a mess, everything tacked on the host OS, some stuff installed directly, others as docker, firewall was just a bunch of hand-written iptables rules...

I got a newer motherboard and CPU to replace my ageing i5-2500K, so I decided to start from scratch.

First order of business: Something to manage VMs and containers. Second: a decent firewall. Third: One app, one container.

I ended up with:

  • Proxmox as VM and container manager
  • OPNSense as firewall. Server has 3 network cards (1 built-in, 2 on PCIe slots), the 2 add-ons are passed through to OPNSense, the built in is for managing Proxmox and for the containers .
  • A whole bunch of LXC containers running all sorts of stuff.

Things look a lot more professional and clean, and it's all much easier to manage.

Does that setup allow access to PCIe GPUs for CUDA inference from containers or VMs?

Yes, you can pass through any GPU to containers pretty easily, and if you are starting with a new VM you can also pass through easily there, but if you are trying to use an existing VM you can run into problems.

Can't say anything about CUDA because I don't have Nvidia cards nor do I work with AI stuff, but I was able to pass the built-in GPU on my Ryzen 2600G to the Jellyfin container so it could do hardware transcoding of videos.

You need the drivers for the GPU installed on the host OS, then link the devices on /dev to the container. For AMD this is easy, bc the drivers are open source and included in the distro (Proxmox is Debian based), for Nvidia you'd have to deal with the proprietary stuff both on the host and on the containers.