I just tested the container and it seems to work for me:
ptrblck@...:~$ nvidia-docker run -it --ipc=host pytorch/pytorch:1.5-cuda10.1-cudnn7-runtime
Unable to find image 'pytorch/pytorch:1.5-cuda10.1-cudnn7-runtime' locally
1.5-cuda10.1-cudnn7-runtime: Pulling from pytorch/pytorch
...
root@c083513e9eba:/workspace# python
Python 3.7.7 (default, Mar 23 2020, 22:36:06)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> x = torch.randn(1, device='cuda')
>>> x
tensor([-0.5422], device='cuda:0')