From my naive understanding this sounds like an issue with the container since it seems to be restarting all the time. Maybe some one from the Balena Team has a bit more experience and can help to debug this
It might be helpful to define an ENTRYPOINT ["/bin/bash"] so CMD [“sleep”, “infinity”] gets executed in the bash. But i am not sure if this is the issue.
Furthermore is there a way you can access the devices logs? In case you got the Balena CLI installed on your computer you can get them with balena logs {UUID} --system. They might give you a better clue on what might be the issue.
Then after pushing this project into the application on Balena cloud, when I run this project in terminal, it said that the TensorRT models couldn’t be loaded.
At this time, Tensorflow-gpu version is 1.13.1, the basic image is the same as above.
This means when I installed Tensorflow-gpu 1.13.1 on Balena Cloud, it was successful.
That is to say, when I run the follwoing command on the application of Balena Cloud, it was well done.
No its correct! I just wanted to double check, if this might be the issue.
Sadly i have no clue about the reasons for this behaviour. Since the jetson Nano runs a full version of tensorflow, CUDA, … . It might be worth to try to convert the model on the device itself to a TensorRT model, so that version miss matches between your computer and the Jetson are not the issue.
Lastly you can try to adapt the docker-compose file to run in priveleged=true mode. Since there might be further issues when communicating with the hardware
As a disclaimer: I never used TRT with TF 1.x on the jetson nano and balena, therefore i am currently only guessing about the possible reasons.
It might be worth to publish the error in the NVIDIA developer Forum, since they might have further ideas what to do and know way more about TF and TRT.
I am always thankful for your help.
Thanks to your help, I was able to solve the lots of issues for this project.
Btw, I have encountered another challenge concerned with OpenCV.
As you know, I have been using the following image as a basic one.
FROM bouwe/jetson-nano-l4t-cuda-cudnn-nvinfer-tensorrt-opencv:latest
When I check the version of OpenCV, it is 4.1.2.
Sounds good.
But when I capture by the web camera, it can’t open the camera.
cap = cv2.VideoCapture(0)
ret, img = cap.read()
[ WARN:0] global /app/opencv-4.1.2/modules/videoio/src/cap_v4l.cpp (802) open VIDEOIO ERROR: V4L: can’t open camera by index 0
I guess it is based on the OpenCV built on this image.
How do you think about that?
Have you ever used the OpenCV on this image?
Do you want to use a ribbon cable camera (e.g. raspberry Pi camera) or usb camera?
With using the ribbon camera, you will probably need to start the nvargus-daemon & in the background, such that is able to serve the video via gstreamer.
Furthermore, please check if you are able to see the video0 device in /dev/video0 (ribbon cable) or another usb webcam, …
Lastly check if your python code has root previledges.