Raspberry Pi 3, Ubuntu Core 16, LXD, GPIO access

A while back I thought I read a thread describing methods to expose the RPi GPIO interface to an LXD container. I can’t find that thread now, and am trying to accomplish this. On an Ubuntu Core install to an RPi 3, with Snap installed LXD 3.6, and a Debian container which I’d like to have GPIO access, I’ve tried adding:

  raw.lxc: |
    lxc.cgroup.devices.allow = c 1:* rwm
    lxc.mount.auto=proc:rw sys:rw
    raw.apparmor.profile = unconfined
  security.privileged: "true"

Which I had hoped might do the trick, but seemingly not. Calling a Python script that imports RPi.GPIO fails complaining:

import RPi.GPIO as GPIO
File "/usr/local/lib/python2.7/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

So I guess something else is needed. Has anyone succeeded in this please?

Have you tried to add the device with lxc device add ?