As I said, apt is not available - users are not allowed to just install additional software on the base OS.
Reason for this change was that users broke their entire TrueNAS system by manually running updates with apt. Thats why the devs disabled it alltogether.
There appears to be a way to get it back, but that will flag the entire system as unsupported which is visible in the debug logs when you file a bug or ask for support.
TrueNAS is not the right choice for virtual machines / containers with special requirements like additional apt packages.
You also have to ask yourself if you even want your NAS to take on such specific tasks on top of its main task (being a NAS).
If you are limited to a single machine, I’d install proxmox for your VMs and then also run TrueNAS as a VM on that Proxmox host to which you pass through an HBA.
That way you get nice seperation of your services while still using just one physical system.
/edit:
thinking about it, you might have success deploying a linux VM on TrueNAS to which you pass through the GPU(s), and then install ollama inside that VM.