How to use p2p over PCIe or NVLink between different containers on the same node?

There are two GPUs on my machine that are linked via NVLink and in the same PCIe RC. I run two docker containers which only a single GPU is visible by --gpus deivec=xx parameter.
Later in the test, I was found that the two containers use cudaDeviceCanPeerAccess return can parameter is 0, and cudaDeviceEnabledPeerAccess will return an error. They are unable use p2p.
But when I run the two GPUs in the same container, they are able to use p2p.
Could someone please tell me how to solve this problem? This is very important to me