Jetson GPIO inside docker container

Getting following error while trying to trigger GPIO pin from docker container on Jetson NANO device.
Using python Jetson.GPIO to configure GPIO behaviour.

  File "GPIO.py", line 28, in <module>
    main()
  File "GPIO.py", line 13, in main
    GPIO.setup(output_pin, GPIO.OUT, initial=GPIO.HIGH)
  File "/usr/local/lib/python3.6/dist-packages/Jetson/GPIO/gpio.py", line 360, in setup
    _do_one_channel(ch_info, direction, init, consumer)
  File "/usr/local/lib/python3.6/dist-packages/Jetson/GPIO/gpio.py", line 155, in _do_one_channel
    ch_info.chip_fd = gpio_cdev.chip_open_by_label(ch_info.gpio_chip)
  File "/usr/local/lib/python3.6/dist-packages/Jetson/GPIO/gpio_cdev.py", line 184, in chip_open_by_label
    chip_fd = chip_check_info(label, gpio_device)
  File "/usr/local/lib/python3.6/dist-packages/Jetson/GPIO/gpio_cdev.py", line 164, in chip_check_info
    raise GPIOError(e.errno, "Querying GPIO chip info: " + e.strerror)
Jetson.GPIO.gpio_cdev.GPIOError: [Errno 25] Querying GPIO chip info: Inappropriate ioctl for device

Hi adityajoshi,

Are you using the devkit or custom board for Jetson Nano?
What’s your Jetpack version in use?

Have you referred to the following instruction to setup Jetson-GPIO step-by-step?
NVIDIA/jetson-gpio: A Python library that enables the use of Jetson’s GPIOs (github.com)

I am using custom carrier board for Jetson NANO and JetPack version is 4.6.3.

Jetson.GPIO is working fine while running natively on device but facing an error inside docker container.
Following is my docker-compose file

version: '2.1'

services:
  gpio_test:
    image: test:gpio
    container_name: gpio_test
    command: "sleep infinity"
    privileged: true
    volumes:
      - /etc/timezone:/etc/timezone
      - /etc/localtime:/etc/localtime
      - /etc/udev/rules.d:/etc/udev/rules.d
      - /sys/class/gpio:/sys/class/gpio
      - /sys/devices:/sys/devices
      - /dev:/dev
      # - /usr/bin/tegrastats:/usr/bin/tegrastats
      - /dev/gpiochip0:/dev/gpiochip0
      - /dev/gpiochip1:/dev/gpiochip1
      - /dev/gpiochip2:/dev/gpiochip2
      - /run/jtop.sock:/run/jtop.sock
      - /proc/device-tree/chosen:/proc/device-tree/chosen
      - /proc/device-tree/compatible:/proc/device-tree/compatible

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Please share the full dmesg when you hit the issue.