TrueNAS Scale 24.10 Docker GPU Passthrough Errors

I have recently upgraded and have my apps migrated. My Plex app requires the use of my NVIDIA Card for hardware transcoding.

I have enabled NVIDIA in the Apps Settings

However, when editing the Plex config the GPU is being shown but when I enable and Update the config I receive the following errors:

[EFAULT] Failed to render compose templates: base_v1_1_4.utils.TemplateException: Expected [uuid] to be set for GPU inslot [0000:01:00.0] in [nvidia_gpu_selection]

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 488, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 535, in __run_body
rv = await self.middleware.run_in_thread(self.method, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1364, 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 1361, 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: base_v1_1_4.utils.TemplateException: Expected [uuid] to be set for GPU inslot [0000:01:00.0] in [nvidia_gpu_selection]

I have tried passing the actual UUID through to the container, but errors as well.

Anyone having the same issues please?

thanks in advance
Gary

Not sure but perhaps see this thread…

1 Like
1 Like

Hi, I noticed that my Plex is no longer transcoding using Nvidia Hardware.

It appears I have the same issue I was experiencing before under TrueNAS Scale 24.10.0.

I am now running ElectricEel-24.10.0.2 and I am experiencing the same issue when trying to enable NVIDIA GPU within Plex. The NVIDIA Drivers are loaded, the option to enable the GPU within the Plex App is available, and when I tick the box and update the App I get the same issues and same errors.

Running the commands above in the shell does not work
‘/bin/sh: 1: midclt: not found
/bin/sh: 1: jq: not found’

Any help please, I would be most grateful!!

Gary

Here is the full crash information:

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/plex-elsa-media/versions/1.1.3/templates/docker-compose.yaml”, line 3, in top-level template code {% set c1 = tpl.add_container(values.consts.plex_container_name, values.plex.image_selector) %} ^^^^^^^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/plex-elsa-media/versions/1.1.3/templates/library/base_v2_0_15/render.py”, line 50, in add_container container = Container(self, name, image) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/plex-elsa-media/versions/1.1.3/templates/library/base_v2_0_15/container.py”, line 61, in init self.deploy: Deploy = Deploy(self._render_instance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/plex-elsa-media/versions/1.1.3/templates/library/base_v2_0_15/deploy.py”, line 15, in init self.resources: Resources = Resources(self._render_instance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/plex-elsa-media/versions/1.1.3/templates/library/base_v2_0_15/resources.py”, line 24, in init self._auto_add_gpus_from_values() File “/mnt/.ix-apps/app_configs/plex-elsa-media/versions/1.1.3/templates/library/base_v2_0_15/resources.py”, line 55, in _auto_add_gpus_from_values raise RenderError(f"Expected [uuid] to be set for GPU in slot [{pci}] in [nvidia_gpu_selection]") base_v2_0_15.error.RenderError: Expected [uuid] to be set for GPU in slot [0000:01:00.0] in [nvidia_gpu_selection]

This rather than a zsh error tells me that you’re running the command from inside the Plex shell. Please run the command from the TrueNAS shell under System → Shell or via an SSH session instead.

Yep that worked, so sorry, feeling very silly :slight_smile:

Thanks for replying so quickly !

Problem resolved thanks

1 Like