“NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver” on fresh Ubuntu 18.04 installation

I installed Ubuntu 18.04 and the first thing I did was I installed cuda like instructed here: cuda installation guide
When I do nvcc --version I get>

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

My GPU is a GTX 970 when I do lspci | grep -i nvidia:

01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)

When I do dpkg -l | grep nvidia I get:

ii  libnvidia-cfg1-418:amd64                           418.87.00-0ubuntu1                               amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-418                               418.87.00-0ubuntu1                               all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-418:amd64                        418.87.00-0ubuntu1                               amd64        NVIDIA libcompute package
ii  libnvidia-decode-418:amd64                         418.87.00-0ubuntu1                               amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-418:amd64                         418.87.00-0ubuntu1                               amd64        NVENC Video Encoding runtime library
ii  libnvidia-fbc1-418:amd64                           418.87.00-0ubuntu1                               amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-418:amd64                             418.87.00-0ubuntu1                               amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-418:amd64                           418.87.00-0ubuntu1                               amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-418                           418.87.00-0ubuntu1                               amd64        NVIDIA compute utilities
ii  nvidia-dkms-418                                    418.87.00-0ubuntu1                               amd64        NVIDIA DKMS package
ii  nvidia-driver-418                                  418.87.00-0ubuntu1                               amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-418                           418.87.00-0ubuntu1                               amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-418                           418.87.00-0ubuntu1                               amd64        NVIDIA kernel source package
ii  nvidia-modprobe                                    418.87.00-0ubuntu1                               amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-prime                                                                       all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                    418.87.00-0ubuntu1                               amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-418                                   418.87.00-0ubuntu1                               amd64        NVIDIA driver support binaries
ii  xserver-xorg-video-nvidia-418                      418.87.00-0ubuntu1                               amd64        NVIDIA binary Xorg driver

Help would be appreciated as it is a clean install and in theory there shouldn’t be a conflict.