@ngimel just explained, that you are using a runtime container, which does not come with nvcc. Instead you could pull a devel container using:
pytorch/pytorch:nightly-devel-cuda10.0-cudnn7

Could you try that?