2 Intel Arc Cards, Assign to two different Apps, Is this possible?

TrueNAS Scale 24.04.2.5 And I have 2 Intel ARC A310’s installed:

admin@truenas[~]$ lspci | grep VGA
03:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A310] (rev 05)
09:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A310] (rev 05)
admin@truenas[~]$ ls -la /dev/dri
total 0
drwxr-xr-x  3 root root        140 Feb 27 16:31 .
drwxr-xr-x 20 root root       4300 Feb 27 16:32 ..
drwxr-xr-x  2 root root        120 Feb 27 16:31 by-path
crw-rw----  1 root video  226,   0 Feb 27 16:31 card0
crw-rw----  1 root video  226,   1 Feb 27 16:31 card1
crw-rw----  1 root render 226, 128 Feb 27 16:31 renderD128
crw-rw----  1 root render 226, 129 Feb 27 16:31 renderD129

I have a Handbrake Container and a Plex Container, and I would like to assign 1 of these cards to Handbrake, and one to Plex, but in the App Settings in the Web Interface, Under “Resources Configuration” for the individual apps, I see the following, when trying to add a GPU to the container:

Allocate 0 gpu.intel.com/i915 GPU
Allocate 1 gpu.intel.com/i915 GPU
Allocate 2 gpu.intel.com/i915 GPU
Allocate 3 gpu.intel.com/i915 GPU
Allocate 4 gpu.intel.com/i915 GPU
Allocate 5 gpu.intel.com/i915 GPU
Allocate 6 gpu.intel.com/i915 GPU
Allocate 7 gpu.intel.com/i915 GPU
Allocate 8 gpu.intel.com/i915 GPU
Allocate 9 gpu.intel.com/i915 GPU
Allocate 10 gpu.intel.com/i915 GPU

So Far, no combination of selecting any of those options is allowing me to assign one card to the Handbrake Container, and one to the Plex Container, It appears that if I select anything other than Allocate 0 gpu.intel.com/i915 GPU that it assigns both GPU’s to one container.

If I for instance, select Allocate 2 gpu.intel.com/i915 GPU in both containers configuration, the first container I start is fine, but the second won’t actually start, because I think the entire GPU Resource is being assigned to one container?

Is this a bug, or something I’m just not understanding?

Can you not add /dev/dri/renderD128 device mapping to one container, and /dev/dri/renderD129 device mapping to another container?

I’m on Fangtooth now so don’t remember how the GPU allocation worked on 24.

I don’t know that I can’t do that, but I don’t know how, it’s not really clear to me in the container configuration how I would do that. I’m certainly willing to try it, if somebody can point me towards some sort of example.

I don’t remember what the app configuration on Electric Eel looked like. It might be the same. On Fangtooth, there’s a ‘devices’ section where you can add mappings:

devices:
  - /dev/dri/renderD128:/dev/dri/renderD128

You might need to verify permissions within the container to that device.

I’ll go give that a shot, thanks for giving me a direction to dig.

I only have one Arc (great cards for these things), so haven’t tried it myself. It’s not really clear to me why there’s a checkbox in the custom app dialog to add GPU support when you can map under the devices section. I assume it’s just to make it easier for users, but it may also add the required drivers to the custom app – both good things.

Let us know how it goes.

So in Dragonfish, there doesn’t appear to be a “Devices” Section.

Sorry, I just realized the allocation text you pasted seemed vaguely familiar because it was from the Kubernetes app era. Electric Eel (24.10) is when Docker was introduced.

Apologies, I thought 24.x was Docker. Back to the drawing board…

So is this something that I would be better served by updating to Electric Eel or something else?

I’m very much a novice with Kubernetes. If ChatGPT isn’t lying to me, there isn’t a good way to assign specific containers to specific Intel GPUs. Here is more information from Intel:
https://intel.github.io/intel-device-plugins-for-kubernetes/cmd/gpu_plugin/README.html

I won’t accept the liability of suggesting you upgrade :stuck_out_tongue: Personally, I didn’t have any issues or regrets upgrading. If you’re using TrueCharts apps, you will need to manually recreate the apps on Electric Eel (unless there are other options I’m unaware of). If you use TrueNAS official charts, the apps should migrate.

Might want to wait and see what others have to say.

I only had one TrueChart app, so I went ahead and pulled the trigger and updated to Electric Eel.

Worked fine, and I can assign the video cards per container.

Pretty painless.

4 Likes