CUDA installation error: NVIDIA Installer failed

I am trying to install CUDA toolkit, but the installation quits with a non descriptive message saying NVIDIA Installer failed. It says “Graphics Driver 377.35 Failed”. Can you suggest what I might be doing wrong? I am trying to use CUDA in Matlab 2016b, but currently “cudapath=getenv(‘CUDA_PATH’)” returns empty. I am new to this, so there might be a silly mistake on my part.

System: Windows 10 Pro, Version 10.0.14393 Build 14393, 32 GB RAM
GPU: Tesla K40c

OS Name Microsoft Windows 10 Pro
Version 10.0.14393 Build 14393
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name AMC-SUPMICRO1
System Manufacturer Supermicro
System Model SYS-7048A-T
System Type x64-based PC
System SKU Unsupported
Processor Intel® Xeon® CPU E5-2620 v4 @ 2.10GHz, 2101 Mhz, 8 Core(s), 16 Logical Processor(s)
BIOS Version/Date American Megatrends Inc. 2.0, 2/2/2016
SMBIOS Version 3.0
BIOS Mode UEFI
BaseBoard Manufacturer Supermicro
BaseBoard Model Not Available
BaseBoard Name Base Board
Platform Role Workstation
Secure Boot State Off
PCR7 Configuration Binding Not Possible
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume2
Locale United States
Hardware Abstraction Layer Version = “10.0.14393.206”
User Name UNIVERSITY\alexeevt
Time Zone Mountain Daylight Time
Installed Physical Memory (RAM) 32.0 GB
Total Physical Memory 31.9 GB
Available Physical Memory 24.9 GB
Total Virtual Memory 36.6 GB
Available Virtual Memory 28.6 GB
Page File Space 4.75 GB
Page File C:\pagefile.sys
Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware Yes
Hyper-V - Data Execution Protection Yes

Name AMD FirePro W5100
PNP Device ID PCI\VEN_1002&DEV_6649&SUBSYS_030C1002&REV_00\4&16866DE7&0&0010
Adapter Type AMD FirePro SDI (0x6649), Advanced Micro Devices, Inc. compatible
Adapter Description AMD FirePro W5100
Adapter RAM (1,048,576) bytes
Installed Drivers aticfx64.dll,aticfx64.dll,aticfx64.dll,amdxc64,aticfx32,aticfx32,aticfx32,amdxc32,atiumd64,atidxx64.dll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64
Driver Version 21.19.141.0
INF File oem4.inf (ati2mtag_R505DS section)
Color Planes Not Available
Color Table Entries 4294967296
Resolution 1920 x 1080 x 60 hertz
Bits/Pixel 32
Memory Address 0xE0000000-0xEFFFFFFF
Memory Address 0xF0000000-0xF07FFFFF
I/O Port 0x0000E000-0x0000E0FF
Memory Address 0xF8200000-0xF823FFFF
IRQ Channel IRQ 4294967271
I/O Port 0x000003B0-0x000003BB
I/O Port 0x000003C0-0x000003DF
Memory Address 0xA0000-0xBFFFF
Driver c:\windows\system32\driverstore\filerepository\c0308055.inf_amd64_871b0852af124765\atikmpag.sys (21.19.128.15, 506.88 KB (519,048 bytes), 10/4/2016 7:10 PM)

Name NVIDIA Tesla K40c
PNP Device ID PCI\VEN_10DE&DEV_1024&SUBSYS_098310DE&REV_A1\4&FC7F53B&0&0018
Adapter Type Not Available, NVIDIA compatible
Adapter Description NVIDIA Tesla K40c
Adapter RAM Not Available
Installed Drivers nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um,nvwgf2um
Driver Version 10.18.13.5330
INF File oem18.inf (Section022 section)
Color Planes Not Available
Color Table Entries 4294967296
Resolution 1920 x 1080 x 60 hertz
Bits/Pixel 32
Memory Address 0xF7000000-0xF7FFFFFF
Memory Address 0xC0000000-0xD1FFFFFF
Memory Address 0xD0000000-0xD1FFFFFF
IRQ Channel IRQ 4294967270
Driver c:\windows\system32\drivers\nvlddmkm.sys (10.18.13.5330, 10.58 MB (11,095,696 bytes), 6/17/2015 9:22 AM)

If anyone runs into this problem, I was able to install CUDA 7.5.18