I use native on my 18.04 workstation, and docker for my 20.04 laptop so I can do field deployment.
Here are some of the things I have noted:
con: Native pollutes the system’s python3.6 interpreter with a very large number of packages, since the install script doesn’t use a virtual environment.
con: pollutes installed packages and can be incompatible with unrelated projects that use different versions of Nvidia components such as CUDA.
con: Only supports Ubuntu 18.04
pro: code resolution works with IDEs that understand Bazel
pro: simpler setup and usage
pro: no additional effort required to use hardware devices such as USB sensors.
pro: self-contained environment
pro: Can be used on any system that supports Docker and x86/x64 containers.
con: Not sure you can pass hardware devices into containers.
con: Limited IDE support. Probably works If you have a language server, but I can safely say Clion+bazel plugin doesn’t work anywhere near as well as native.