Is there a way to do profiling in lxd containers?

Hi community,

I’m currently using python programs to train neural networks in lxd (5.0 stable) containers with Nvidia GPUs.
To find and address performance bottleneck, I was planing to do profiling with Nvidia Nsight Systems tool.
However, I wasn’t able to get backtrace information maybe due to security restrictions.
I’ve tried to find relavant approach to get over the restrictions with no good:

  1. security.syscalls.allow = perf_event_open (failed to start containers)
  2. security.privileged = true (can’t be used when nvidia.runtime=true)

Nvidia officially give instructions for Docker users: User Guide :: Nsight Systems Documentation (nvidia.com).

I was wondering if there is any way to use this tool with full functions inside lxd containers?

Thank you.