So I was following this post Rpi v2 CSI camera freezes with Jetson Nano 2GB and it works now.
Steps are as follows:
- I reflashed the image.
- I made an additional 8GB swap space.(I didn’t know how to edit or remove the one made in the initial setup so I have a total of 12GB swap now)
- added --memory=500M --memory-swap=8G to the docker run script.
Thanks @dusty_nv and @juliefaurelacroix