Machine Learning Containers for Jetson

Start l4t-ml container and sudo apt-get update
I was able to install it with sudo apt-get install python3-opencv. Then I could commit and create the original container. The camera is xhost + then sudo docker run -it --rm --runtime nvidia --network host --device / dev / video0 -e DISPLAY = $ DISPLAY original container name

Thank you for your success. Thank you very much.

I installed python3-opencv in the l4t-ml container and committed the container to create the original container. After that,
xhost +
sudo docker run -it --rm --runtime nvidia --network host --device / dev / video0 -e DISPLAY = $ DISPLAY The original container name
was executed and the camera was working, but in Network Connections The camera stopped working when an arbitrary IP address was set for Ethernet. I don’t know the cause.

The error is

select timeout
OpenCV Error: Assertion failed (total() == 0 || data != NULL) in Mat, file /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/core/include/opencv2/core/mat.inl.hpp, line 431
Traceback (most recent call last):
File “”, line 35, in
cv2.error: /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/core/include/opencv2/core/mat.inl.hpp, line 431: error: (-215) total() == || data != NULL in function Mat

dev / video0 → changed to dev / video1
cv2.VideoCapture (0) → changed to cv2.VideoCapture (1)

I was healed

I wanted to use gpio with TX2, so I did the following.

sudo apt install python3-dev python3-pip

cd /opt/nvidia/
sudo git clone

cd jetson-gpio
sudo python3 install

sudo groupadd -f -r gpio
sudo usermod -a -G username

I ran sudo cp /opt/nvidia/jetson-gpio/etc/99-gpio.rules /etc/udev/rules.d/ but I couldn’t find 99-gpio.rules so Ignored and ran the following

sudo udevadm control --reload-rules && sudo udevadm trigger


cd /opt/nvidia/jetson-gpio/samples


Then, I could confirm the change of the voltage of 3.3V and 0V from No. 12.

Based on the above
I want to do the same thing from within the l4t-ml container. How do I do this?

Hi @yoshifumi_watanabe_aa, I’m not exactly sure which device files you would need to mount into the container in order to access GPIO, so you may want to file a new topic about that as it isn’t specific to l4t-ml container. But my guess is you could run your container with -v /sys:/sys to access the GPIO controls.