Jetson.GPIO not working on Python inside the container

Hi,

Please try below customized Jetson.GPIO for Nano.
https://github.com/Heerpa/jetson-gpio-nanohard

$ sudo docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix -v /etc/udev/rules.d:/etc/udev/rules.d -v /dev:/dev -v /sys/class/gpio:/sys/class/gpio -v /sys/devices:/sys/devices -v /dev/gpiochip0:/dev/gpiochip0 -v /dev/gpiochip1:/dev/gpiochip1 nvcr.io/nvidia/l4t-base:r32.5.0
$ apt-get update && apt-get install python3-pip git
$ git clone https://github.com/Heerpa/jetson-gpio-nanohard.git
$ cd jetson-gpio-nanohard/
$ python3 setup.py install
# python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Jetson.GPIO as GPIO
WARNING: Hard coded to use board Jetson Nano r200.
WARNNIG: Make sure this is the board you are using
WARNING: Otherwise it is unlikely to work correctly.
>>>

Thanks.

1 Like