Docker Apps and UUID issue with NVIDIA GPU after upgrade to 24.10 or 25.04

Running into this issue with autorippingmachine. Ran the command. Here’s my output:

admin@truenas[~]$ midclt call -job app.update arm-autorip ‘{“values”: {“resources”: {“gpus”: {“use_all_gpus”: false, “nvidia_gpu_selection”: {“0000:01:00.0”: {“use_gpu”: true, “uuid”: “GPU-e3e9cf11-ef82-8763-6ea4-aff21a2e60f6”}}}}}}’
Status: Initial Validation completed
Total Progress: [##########] 25.00%Total Progress: [##########] 25.00%
[EFAULT] Failed to render compose templates: Traceback (most recent call last):
File “/usr/bin/apps_render_app”, line 33, in
sys.exit(load_entry_point(‘apps-validation==0.1’, ‘console_scripts’, ‘apps_render_app’)())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/catalog_templating/scripts/render_compose.py”, line 47, in main
render_templates_from_path(args.path, args.values)
File “/usr/lib/python3/dist-packages/catalog_templating/scripts/render_compose.py”, line 19, in render_templates_from_path
rendered_data = render_templates(
^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/catalog_templating/render.py”, line 36, in render_templates
).render({‘ix_lib’: template_libs, ‘values’: test_values})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 1301, in render
self.environment.handle_exception()
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/docker-compose.yaml”, line 96, in top-level template code
{{ tpl.render() | tojson }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/render.py”, line 69, in render
“services”: {c._name: c.render() for c in self._containers.values()},
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/render.py”, line 69, in
“services”: {c._name: c.render() for c in self._containers.values()},
^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/container.py”, line 398, in render
result[“environment”] = self.environment.render()
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/environment.py”, line 109, in render
raise RenderError(f"Environment variable [{k}] is already defined from the application developer.")
base_v2_1_14.error.RenderError: Environment variable [NVIDIA_DRIVER_CAPABILITIES] is already defined from the application developer.

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 509, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 556, in __run_body
rv = await self.middleware.run_in_thread(self.method, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1367, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1364, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/service/crud_service.py”, line 268, in nf
rv = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 55, in nf
res = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 183, in nf
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 287, in do_update
app = self.update_internal(job, app, data, trigger_compose=app[‘state’] != ‘STOPPED’)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 317, in update_internal
update_app_config(app_name, app[‘version’], new_values, custom_app=app[‘custom_app’])
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/ix_apps/lifecycle.py”, line 59, in update_app_config
render_compose_templates(
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/ix_apps/lifecycle.py”, line 50, in render_compose_templates
raise CallError(f’Failed to render compose templates: {cp.stderr}')
middlewared.service_exception.CallError: [EFAULT] Failed to render compose templates: Traceback (most recent call last):
File “/usr/bin/apps_render_app”, line 33, in
sys.exit(load_entry_point(‘apps-validation==0.1’, ‘console_scripts’, ‘apps_render_app’)())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/catalog_templating/scripts/render_compose.py”, line 47, in main
render_templates_from_path(args.path, args.values)
File “/usr/lib/python3/dist-packages/catalog_templating/scripts/render_compose.py”, line 19, in render_templates_from_path
rendered_data = render_templates(
^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/catalog_templating/render.py”, line 36, in render_templates
).render({‘ix_lib’: template_libs, ‘values’: test_values})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 1301, in render
self.environment.handle_exception()
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/docker-compose.yaml”, line 96, in top-level template code
{{ tpl.render() | tojson }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/render.py”, line 69, in render
“services”: {c._name: c.render() for c in self._containers.values()},
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/render.py”, line 69, in
“services”: {c._name: c.render() for c in self._containers.values()},
^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/container.py”, line 398, in render
result[“environment”] = self.environment.render()
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/.ix-apps/app_configs/arm-autorip/versions/1.1.10/templates/library/base_v2_1_14/environment.py”, line 109, in render
raise RenderError(f"Environment variable [{k}] is already defined from the application developer.")
base_v2_1_14.error.RenderError: Environment variable [NVIDIA_DRIVER_CAPABILITIES] is already defined from the application developer.

I was having this issue, but I did have to take an additional first step as another user pointed out. when i checked first, the nvidia drivers were not installed.

had to run this first from shell:

midclt call -job docker.update ‘{“nvidia”: true}’

then i rebooted, stopped the plex app, and followed the instructions in the original post.

Just ran this with the following result:

admin@truenas[~]$ midclt call -job docker.update ‘{“nvidia”: true}’
ConfigService.update() takes 3 positional arguments but 4 were given
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 211, in call_method
result = await self.middleware.call_with_audit(message[‘method’], serviceobj, methodobj, params, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1529, in call_with_audit
result = await self._call(method, serviceobj, methodobj, params, app=app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1460, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ConfigService.update() takes 3 positional arguments but 4 were given

midclt call -job docker.update '{"nvidia": true}'

if this doesn’t post properly, the issue is the single quotes surrounding {“nvidia”: true}

try just typing them in manually. I had the same issue copying and pasting.

Ok, this got this command to complete. However the prior command still throws the same error.
midclt call -job app.update arm-autorip ‘{“values”: {“resources”: {“gpus”: {“use_all_gpus”: false, “nvidia_gpu_selection”: {“0000:01:00.0”: {“use_gpu”: true, “uuid”: “GPU-e3e9cf11-ef82-8763-6ea4-aff21a2e60f6”}}}}}}’
is still not working for me.

I posted in a new thread yesterday when I suffered a problem (I’m using ElectricEel-24.10.1):

Please could someone look at my post and let me know whether the discussions here might be relevant and hence worth trying?

I am sorry to say I am out of my depth and I can’t tell if the fix discussed here is pertinent or not.

(My problem is with an “official” App from my point of view, rather than with a Docker App as per the title of this thread, although I appreciate those might be one and the same)

Thanks and sorry for the unintentional cross-post/duplication.
I got to the bottom of things with some encouragement from @joeschmuck, shown here.

I’m not 100% but the error sounds like the gpu selection value is already set somewhere else, maybe check the GUI and ensure everything GPU related at the bottom is unchecked? also maybe check that under advanced settings the gpu is NOT isolated.

so you is it working for you now? I am also trying to get ollama to work on my nas and it wont read my M6000. It works when I push it into a VM with windows.

Thanks! Fixed my issue after a hardware change.

Is this still required after upgrading to 24.10.2? I’m not getting any errors now, the nvidia gpu does show up in my plex and frigate instances, but I don’t think they’re actually working since I see no process. Here is the output of my nvidia-smi command:

# nvidia-smi
Fri Feb 28 11:18:17 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.127.05             Driver Version: 550.127.05     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1060 6GB    Off |   00000000:01:00.0 Off |                  N/A |
|  0%   45C    P2             29W /  180W |     289MiB /   6144MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
+-----------------------------------------------------------------------------------------+

I’ve confirmed both frigate and plex have nvidia hardware acceleration enabled

Are you running it while Plex is actively transcoding a stream? You might have to test while manually reducing the quality & having something playing.

Thanks for the reply. I just tested, and Plex transcoding doesn’t even work unless I unselect “Use hardware-accelerated video encoding” in the settings. Confirmed CPU based transcoding is still working, but it definitely isn’t using my GPU

Edit: misread your post; yeah that is rough. It indeed seems to be not using the gpu… Odd. Have you tried removing & then readding nvidia drivers through the gui?

I accidentally found a solution to the problem.
I have the same problem as the topic starter: installed Nvidia Drivers,nvidia-smi is working but plex HW encoding is not working.
The problem is in the lack of user rights for user “apps”
Just go to Credentials>Users find user “apps” then click “Edit”
In “Auxiliary Groups” add user to groups “video” and “render”. Click “Save”.
Bingo!
Hardware encoding is working now.

1 Like

Attempted the following:

  • unselected “Install Nvidia Drivers” in app settings. Restarted. Re-selected option. Unset pool and re-set it.
  • Edited “app” user auxiliary permissions to include “video” and “render”. Restarted

Sadly neither of these were successful for me.

Just coming here to say thanks this worked for my plex issue!

In my case I had an this issue after changing the GPU. Ollama won’t start because it still tried to access old gpu by id.
Command that fixed it was the following, don’t forget to replace ollama with your service name and gpu id

 midclt call -job app.update ollama '{"values": {"resources": {"gpus": {"use_all_gpus": false, "nvidia_gpu_selection": {"0000:01:00.0": {"use_gpu": true, "uuid": "GPU-0b3a1f32-229e-47fe-0491-319008c9719b"}}}}}}'

Hello, i need a little bit of help after updating to Truenas 25.04 RC1

the command “midclt call -job” it’s giving me an unrecognised argument error -ob

and i don’t see any mistake in the command.
can anyone help with an orientation ? thank you.

midclt call -job app.update jellyfin ‘{“values”: {“resources”: {“gpus”: {“use_all_gpus”: false, “nvidia_gpu_selection”: {“0000:01:00.0”: {“use_gpu”: true, “uuid”: “GPU-e1460109-2841-0bc4-77df-38c919861232”}}}}}}’
usage: midclt [-h] [-q] [-u URI] [-U USERNAME] [-P PASSWORD] [-K API_KEY] [-t TIMEOUT] {call,ping,waitready,subscribe} …
midclt: error: unrecognized arguments: -ob

There’s been a change to midclt in 25.04. Try

midclt call -j app.update jellyfin '{"values": {"resources": {"gpus": {"use_all_gpus": false, "nvidia_gpu_selection": {"0000:01:00.0": {"use_gpu": true, "uuid": "GPU-e1460109-2841-0bc4-77df-38c919861232"}}}}}}'

Hi,

I am running TrueNAS SCALE ElectricEel 24.10
The system in running on a Ryzen 5600G for a few months now.
I have added an Nvidia RTX 3060.
I got the same error when trying to edit /add Nvidia GPU to apps that benefit from it (Immich and Frigate)

The solution provided worked in my case as well.

Thanks