

Download the NVIDIA CUDA Toolkitĭepending on your installation method of choice, you need to download equivalent package. Once this has been installed, you can proceed to install Nvidia CUDA toolkit. Install it on Ubuntu 18.04 using the command: $ sudo apt install nvidia-384 You can install kernel headers and development tools using: $ sudo apt-get install linux-headers-$(uname -r) Install NVIDIA DriverĬUDA needs Nvidia driver installed on your machine. The CUDA Driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. Verify the system has the correct kernel headers and development packages installed. If not installed, install it with apt-get as below: $ sudo apt install gcc-6 g++-6 You can check if it's installed using the command: $ gcc -version # update-pciids Verify the system has gcc installedįor development using the CUDA, you need to make sure gcc is installed.
