Hi mate i had problem in installing the drivers
i followed every tutorials in internet and at last tried you tutorial but no result of fking nvidia drivers
My laptop specs are:
1.Intel® Core™ i7-7700HQ CPU @ 2.80GHz × 8
2intel graphics=Intel® Kabylake GT2
3.Nvidia=geforce gtx 1050M
4.8 gigs of ram
5.128 gb nvme ssd

My system

Code:
root@kali-Killer:~# uname -a
Linux kali-Killer 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux
Code:
root@kali-Killer:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.1"
VERSION_ID="2017.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"
Started steps of nvidia drivers

Code:
root@kali-Killer:~# lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
I sucessfully disabled nouveau

Code:
echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf
update-initramfs -u && reboot
r

From this step I install nvidia drivers

Code:
apt-get install  nvidia-driver nvidia-xconfig
after installing the drivers i restarted my laptop and shows me sad emoji symbol of crash
and i went into recovery mode uninstall nvidia drivers to back to old intel graphics

first i thought that nvidia didn't made CUDA toolkit for gtx 1050M
so i went into some forums and searched cuda toolkit for my gpu
some members said me that cuda toolkit support every gpu
but why my gpu sucks

so i hope you can fix this problem and sorry for my bad English