How do I install NVIDIA and CUDA drivers into Ubuntu?How to make an xorg.conf fileNo hardware working on Ubuntu 16.04 kernel 4.4.0-78-genericHow to configure iGPU for xserver and nvidia GPU for CUDA workInstalling newest PPA driver for Nvidia (410) leads to black screenCUDA problems with nvidia driver versionUbuntu 18.04 and CUDAProblem with Nvidia drivers for K20, C2070 on Ubuntu 12.04Installing Nvidia drivers and CUDAUbuntu 16.04 install cuda 6.5How to winstall Nvidia drivers to use CUDA without also installing X11?Ubuntu doesn't recommend latest Nvidia drivers for installing CUDA 8intel core i5 and nvidia gforce opencl cuda platforms 0Overclocking Nvidia on UbuntuHow can I install CUDA 9.0 for Ubuntu 17.10 without changing the current nvidia drivers?How can I verify correct CUDA is installed on my Ubuntu 16.04?What is the right way to install drivers on Ubuntu 16.04?

Creepy dinosaur pc game identification

Aragorn's "guise" in the Orthanc Stone

GraphicsGrid with a Label for each Column and Row

Delivering sarcasm

What if a revenant (monster) gains fire resistance?

What was this official D&D 3.5e Lovecraft-flavored rulebook?

Why is it that I can sometimes guess the next note?

Approximating irrational number to rational number

How can "mimic phobia" be cured or prevented?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

How do you make your own symbol when Detexify fails?

Longest common substring in linear time

What should you do if you miss a job interview (deliberately)?

A social experiment. What is the worst that can happen?

Should I stop contributing to retirement accounts?

Is it improper etiquette to ask your opponent what his/her rating is before the game?

Why is so much work done on numerical verification of the Riemann Hypothesis?

What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?

On a tidally locked planet, would time be quantized?

C++ debug/print custom type with GDB : the case of nlohmann json library

Why should universal income be universal?

When were female captains banned from Starfleet?

Energy measurement from position eigenstate

Multiplicative persistence



How do I install NVIDIA and CUDA drivers into Ubuntu?


How to make an xorg.conf fileNo hardware working on Ubuntu 16.04 kernel 4.4.0-78-genericHow to configure iGPU for xserver and nvidia GPU for CUDA workInstalling newest PPA driver for Nvidia (410) leads to black screenCUDA problems with nvidia driver versionUbuntu 18.04 and CUDAProblem with Nvidia drivers for K20, C2070 on Ubuntu 12.04Installing Nvidia drivers and CUDAUbuntu 16.04 install cuda 6.5How to winstall Nvidia drivers to use CUDA without also installing X11?Ubuntu doesn't recommend latest Nvidia drivers for installing CUDA 8intel core i5 and nvidia gforce opencl cuda platforms 0Overclocking Nvidia on UbuntuHow can I install CUDA 9.0 for Ubuntu 17.10 without changing the current nvidia drivers?How can I verify correct CUDA is installed on my Ubuntu 16.04?What is the right way to install drivers on Ubuntu 16.04?













15















I have a system with a NVIDIA card that has a compute support of 3.5+ compared on https://developer.nvidia.com/cuda-gpus. How do I install CUDA and the NVIDIA drivers in Ubuntu without downloading the .deb files from NVIDIA?










share|improve this question




























    15















    I have a system with a NVIDIA card that has a compute support of 3.5+ compared on https://developer.nvidia.com/cuda-gpus. How do I install CUDA and the NVIDIA drivers in Ubuntu without downloading the .deb files from NVIDIA?










    share|improve this question


























      15












      15








      15


      16






      I have a system with a NVIDIA card that has a compute support of 3.5+ compared on https://developer.nvidia.com/cuda-gpus. How do I install CUDA and the NVIDIA drivers in Ubuntu without downloading the .deb files from NVIDIA?










      share|improve this question
















      I have a system with a NVIDIA card that has a compute support of 3.5+ compared on https://developer.nvidia.com/cuda-gpus. How do I install CUDA and the NVIDIA drivers in Ubuntu without downloading the .deb files from NVIDIA?







      nvidia cuda






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 25 '18 at 17:24







      Terrance

















      asked Sep 20 '18 at 22:11









      TerranceTerrance

      20.2k34898




      20.2k34898




















          3 Answers
          3






          active

          oldest

          votes


















          25














          Ubuntu 18.04, CUDA 10.0 and NVIDIA 418.43 drivers:



          NOTE: CUDA 9.x is not available through NVIDIA's ubuntu1804 repo. I did however write an answer for CUDA 9.2 at https://askubuntu.com/a/1086993/231142



          These instructions are for installing CUDA through the repository instead of the .deb installation.



          The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



          Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



          sudo rm /etc/apt/sources.list.d/cuda*
          sudo apt remove nvidia-cuda-toolkit


          Recommended to also remove all NVIDIA drivers before installing new drivers:



          sudo apt remove nvidia-*


          Then update the system:



          sudo apt update


          Install the key:



          sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub


          Add the repo:



          sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


          Update the system again:



          sudo apt update


          If you only want the NVIDIA 418.43 driver run, if not, skip this step:



          sudo apt install nvidia-driver-418


          Install CUDA 10.0.



          sudo apt install cuda-10-0


          It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/



          Add the following lines to your ~/.profile file for CUDA 10.0



          # set PATH for cuda 10.0 installation
          if [ -d "/usr/local/cuda-10.0/bin/" ]; then
          export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
          export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
          fi


          Reboot the computer and check your settings when reboot is complete:



          Check NVIDIA Cuda Compiler with nvcc --version:



          terrance@terrance-ubuntu:~$ nvcc --version
          nvcc: NVIDIA (R) Cuda compiler driver
          Copyright (c) 2005-2018 NVIDIA Corporation
          Built on Sat_Aug_25_21:08:01_CDT_2018
          Cuda compilation tools, release 10.0, V10.0.130


          Check NVIDIA driver with nvidia-smi:



          terrance@terrance-ubuntu:~$ nvidia-smi 
          Sat Mar 23 20:52:18 2019
          +-----------------------------------------------------------------------------+
          | NVIDIA-SMI 418.43 Driver Version: 418.43 CUDA Version: 10.1 |
          |-------------------------------+----------------------+----------------------+
          | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
          | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
          |===============================+======================+======================|
          | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
          | 43% 41C P8 N/A / N/A | 122MiB / 1998MiB | N/A Default |
          +-------------------------------+----------------------+----------------------+

          +-----------------------------------------------------------------------------+
          | Processes: GPU Memory |
          | GPU PID Type Process name Usage |
          |=============================================================================|
          | 0 Not Supported |
          +-----------------------------------------------------------------------------+





          share|improve this answer




















          • 1





            Note that as of 2018-11 you need cuda 0.9 for tensorflow.

            – mathtick
            Nov 24 '18 at 12:10






          • 1





            installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

            – fccoelho
            Jan 24 at 15:50











          • @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

            – Terrance
            Jan 24 at 16:39


















          2














          Ubuntu 16.04, CUDA 9.2 and NVIDIA 396 drivers:



          NOTE: NVIDIA's repo here has decided to push the 410 drivers. I will do some testing to see if I can get it to set for the driver you want installed.



          These instructions are for installing CUDA through the repository instead of the .deb installation.



          The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



          Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



          sudo rm /etc/apt/sources.list.d/cuda*
          sudo apt remove nvidia-cuda-toolkit


          Recommended to also remove all NVIDIA drivers before installing new drivers:



          sudo apt remove nvidia-*


          Then update the system:



          sudo apt update


          Install the key:



          sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub


          Add the repo:



          sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


          Update for the new repo being added:



          sudo apt update


          Install CUDA 9.2:



          sudo apt install cuda-9-2


          It should be installing the nvidia-396 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/



          Verify that CUDA 9.2 was installed:



          ~$ ls /usr/local/cuda-9.2/
          bin include libnvvp nvml samples targets
          doc lib64 LICENSE nvvm share tools
          extras libnsight nsightee_plugins README src version.txt


          Now, add the following to your ~/.profile for the PATH and LD_LIBRARY. You can use the command gedit ~/.profile for editing:



          # set PATH for cuda 9.2 installation
          if [ -d "/usr/local/cuda-9.2/bin/" ]; then
          export PATH=/usr/local/cuda-9.2/bin$PATH:+:$PATH
          export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
          fi


          Reboot your system.



          sudo reboot


          Once the system is up, you can verify the installation by typing in the following:



          nvcc -V


          You should see something similar the following:



          ~$ nvcc -V
          nvcc: NVIDIA (R) Cuda compiler driver
          Copyright (c) 2005-2017 NVIDIA Corporation
          Built on Fri_Nov__3_21:07:56_CDT_2017
          Cuda compilation tools, release 9.1, V9.1.85


          And you should see the 396.xx drivers installed:



          ~$ nvidia-smi
          Thu May 17 07:38:54 2018
          +-----------------------------------------------------------------------------+
          | NVIDIA-SMI 396.44 Driver Version: 396.44 |
          |-------------------------------+----------------------+----------------------+
          | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
          | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
          |===============================+======================+======================|
          | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
          | 49% 53C P0 N/A / N/A | 187MiB / 1999MiB | N/A Default |
          +-------------------------------+----------------------+----------------------+

          +-----------------------------------------------------------------------------+
          | Processes: GPU Memory |
          | GPU PID Type Process name Usage |
          |=============================================================================|
          | 0 Not Supported |
          +-----------------------------------------------------------------------------+







          share|improve this answer
































            1














            Ubuntu 14.04, CUDA 10.0 and NVIDIA 410 drivers:



            Please note that I don't have Ubuntu 14.04 installed so I cannot verify if these steps work or not. But according to http://developer.download.nvidia.com/compute/cuda/repos/ from NVIDIA, it should be the same steps as I have listed in the other two answers.



            These instructions are for installing CUDA through the repository instead of the .deb installation.



            The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



            Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



            sudo rm /etc/apt/sources.list.d/cuda*
            sudo apt remove nvidia-cuda-toolkit


            Recommended to also remove all NVIDIA drivers before installing new drivers:



            sudo apt remove nvidia-*


            Then update the system:



            sudo apt update


            Install the key:



            sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub


            Add the repo:



            sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


            Update the system again:



            sudo apt update


            Install CUDA 10.0.



            sudo apt install cuda-10-0


            It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/



            Add the following lines to your ~/.profile file for CUDA 10.0



            # set PATH for cuda 10.0 installation
            if [ -d "/usr/local/cuda-10.0/bin/" ]; then
            export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
            export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
            fi


            Reboot the computer and check your settings when reboot is complete:



            Check NVIDIA Cuda Compiler with nvcc --version:



            Check NVIDIA driver with nvidia-smi:






            share|improve this answer






















              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "89"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1077061%2fhow-do-i-install-nvidia-and-cuda-drivers-into-ubuntu%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              25














              Ubuntu 18.04, CUDA 10.0 and NVIDIA 418.43 drivers:



              NOTE: CUDA 9.x is not available through NVIDIA's ubuntu1804 repo. I did however write an answer for CUDA 9.2 at https://askubuntu.com/a/1086993/231142



              These instructions are for installing CUDA through the repository instead of the .deb installation.



              The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



              Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



              sudo rm /etc/apt/sources.list.d/cuda*
              sudo apt remove nvidia-cuda-toolkit


              Recommended to also remove all NVIDIA drivers before installing new drivers:



              sudo apt remove nvidia-*


              Then update the system:



              sudo apt update


              Install the key:



              sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub


              Add the repo:



              sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


              Update the system again:



              sudo apt update


              If you only want the NVIDIA 418.43 driver run, if not, skip this step:



              sudo apt install nvidia-driver-418


              Install CUDA 10.0.



              sudo apt install cuda-10-0


              It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/



              Add the following lines to your ~/.profile file for CUDA 10.0



              # set PATH for cuda 10.0 installation
              if [ -d "/usr/local/cuda-10.0/bin/" ]; then
              export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
              export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
              fi


              Reboot the computer and check your settings when reboot is complete:



              Check NVIDIA Cuda Compiler with nvcc --version:



              terrance@terrance-ubuntu:~$ nvcc --version
              nvcc: NVIDIA (R) Cuda compiler driver
              Copyright (c) 2005-2018 NVIDIA Corporation
              Built on Sat_Aug_25_21:08:01_CDT_2018
              Cuda compilation tools, release 10.0, V10.0.130


              Check NVIDIA driver with nvidia-smi:



              terrance@terrance-ubuntu:~$ nvidia-smi 
              Sat Mar 23 20:52:18 2019
              +-----------------------------------------------------------------------------+
              | NVIDIA-SMI 418.43 Driver Version: 418.43 CUDA Version: 10.1 |
              |-------------------------------+----------------------+----------------------+
              | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
              | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
              |===============================+======================+======================|
              | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
              | 43% 41C P8 N/A / N/A | 122MiB / 1998MiB | N/A Default |
              +-------------------------------+----------------------+----------------------+

              +-----------------------------------------------------------------------------+
              | Processes: GPU Memory |
              | GPU PID Type Process name Usage |
              |=============================================================================|
              | 0 Not Supported |
              +-----------------------------------------------------------------------------+





              share|improve this answer




















              • 1





                Note that as of 2018-11 you need cuda 0.9 for tensorflow.

                – mathtick
                Nov 24 '18 at 12:10






              • 1





                installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

                – fccoelho
                Jan 24 at 15:50











              • @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

                – Terrance
                Jan 24 at 16:39















              25














              Ubuntu 18.04, CUDA 10.0 and NVIDIA 418.43 drivers:



              NOTE: CUDA 9.x is not available through NVIDIA's ubuntu1804 repo. I did however write an answer for CUDA 9.2 at https://askubuntu.com/a/1086993/231142



              These instructions are for installing CUDA through the repository instead of the .deb installation.



              The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



              Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



              sudo rm /etc/apt/sources.list.d/cuda*
              sudo apt remove nvidia-cuda-toolkit


              Recommended to also remove all NVIDIA drivers before installing new drivers:



              sudo apt remove nvidia-*


              Then update the system:



              sudo apt update


              Install the key:



              sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub


              Add the repo:



              sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


              Update the system again:



              sudo apt update


              If you only want the NVIDIA 418.43 driver run, if not, skip this step:



              sudo apt install nvidia-driver-418


              Install CUDA 10.0.



              sudo apt install cuda-10-0


              It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/



              Add the following lines to your ~/.profile file for CUDA 10.0



              # set PATH for cuda 10.0 installation
              if [ -d "/usr/local/cuda-10.0/bin/" ]; then
              export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
              export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
              fi


              Reboot the computer and check your settings when reboot is complete:



              Check NVIDIA Cuda Compiler with nvcc --version:



              terrance@terrance-ubuntu:~$ nvcc --version
              nvcc: NVIDIA (R) Cuda compiler driver
              Copyright (c) 2005-2018 NVIDIA Corporation
              Built on Sat_Aug_25_21:08:01_CDT_2018
              Cuda compilation tools, release 10.0, V10.0.130


              Check NVIDIA driver with nvidia-smi:



              terrance@terrance-ubuntu:~$ nvidia-smi 
              Sat Mar 23 20:52:18 2019
              +-----------------------------------------------------------------------------+
              | NVIDIA-SMI 418.43 Driver Version: 418.43 CUDA Version: 10.1 |
              |-------------------------------+----------------------+----------------------+
              | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
              | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
              |===============================+======================+======================|
              | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
              | 43% 41C P8 N/A / N/A | 122MiB / 1998MiB | N/A Default |
              +-------------------------------+----------------------+----------------------+

              +-----------------------------------------------------------------------------+
              | Processes: GPU Memory |
              | GPU PID Type Process name Usage |
              |=============================================================================|
              | 0 Not Supported |
              +-----------------------------------------------------------------------------+





              share|improve this answer




















              • 1





                Note that as of 2018-11 you need cuda 0.9 for tensorflow.

                – mathtick
                Nov 24 '18 at 12:10






              • 1





                installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

                – fccoelho
                Jan 24 at 15:50











              • @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

                – Terrance
                Jan 24 at 16:39













              25












              25








              25







              Ubuntu 18.04, CUDA 10.0 and NVIDIA 418.43 drivers:



              NOTE: CUDA 9.x is not available through NVIDIA's ubuntu1804 repo. I did however write an answer for CUDA 9.2 at https://askubuntu.com/a/1086993/231142



              These instructions are for installing CUDA through the repository instead of the .deb installation.



              The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



              Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



              sudo rm /etc/apt/sources.list.d/cuda*
              sudo apt remove nvidia-cuda-toolkit


              Recommended to also remove all NVIDIA drivers before installing new drivers:



              sudo apt remove nvidia-*


              Then update the system:



              sudo apt update


              Install the key:



              sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub


              Add the repo:



              sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


              Update the system again:



              sudo apt update


              If you only want the NVIDIA 418.43 driver run, if not, skip this step:



              sudo apt install nvidia-driver-418


              Install CUDA 10.0.



              sudo apt install cuda-10-0


              It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/



              Add the following lines to your ~/.profile file for CUDA 10.0



              # set PATH for cuda 10.0 installation
              if [ -d "/usr/local/cuda-10.0/bin/" ]; then
              export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
              export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
              fi


              Reboot the computer and check your settings when reboot is complete:



              Check NVIDIA Cuda Compiler with nvcc --version:



              terrance@terrance-ubuntu:~$ nvcc --version
              nvcc: NVIDIA (R) Cuda compiler driver
              Copyright (c) 2005-2018 NVIDIA Corporation
              Built on Sat_Aug_25_21:08:01_CDT_2018
              Cuda compilation tools, release 10.0, V10.0.130


              Check NVIDIA driver with nvidia-smi:



              terrance@terrance-ubuntu:~$ nvidia-smi 
              Sat Mar 23 20:52:18 2019
              +-----------------------------------------------------------------------------+
              | NVIDIA-SMI 418.43 Driver Version: 418.43 CUDA Version: 10.1 |
              |-------------------------------+----------------------+----------------------+
              | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
              | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
              |===============================+======================+======================|
              | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
              | 43% 41C P8 N/A / N/A | 122MiB / 1998MiB | N/A Default |
              +-------------------------------+----------------------+----------------------+

              +-----------------------------------------------------------------------------+
              | Processes: GPU Memory |
              | GPU PID Type Process name Usage |
              |=============================================================================|
              | 0 Not Supported |
              +-----------------------------------------------------------------------------+





              share|improve this answer















              Ubuntu 18.04, CUDA 10.0 and NVIDIA 418.43 drivers:



              NOTE: CUDA 9.x is not available through NVIDIA's ubuntu1804 repo. I did however write an answer for CUDA 9.2 at https://askubuntu.com/a/1086993/231142



              These instructions are for installing CUDA through the repository instead of the .deb installation.



              The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



              Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



              sudo rm /etc/apt/sources.list.d/cuda*
              sudo apt remove nvidia-cuda-toolkit


              Recommended to also remove all NVIDIA drivers before installing new drivers:



              sudo apt remove nvidia-*


              Then update the system:



              sudo apt update


              Install the key:



              sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub


              Add the repo:



              sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


              Update the system again:



              sudo apt update


              If you only want the NVIDIA 418.43 driver run, if not, skip this step:



              sudo apt install nvidia-driver-418


              Install CUDA 10.0.



              sudo apt install cuda-10-0


              It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/



              Add the following lines to your ~/.profile file for CUDA 10.0



              # set PATH for cuda 10.0 installation
              if [ -d "/usr/local/cuda-10.0/bin/" ]; then
              export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
              export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
              fi


              Reboot the computer and check your settings when reboot is complete:



              Check NVIDIA Cuda Compiler with nvcc --version:



              terrance@terrance-ubuntu:~$ nvcc --version
              nvcc: NVIDIA (R) Cuda compiler driver
              Copyright (c) 2005-2018 NVIDIA Corporation
              Built on Sat_Aug_25_21:08:01_CDT_2018
              Cuda compilation tools, release 10.0, V10.0.130


              Check NVIDIA driver with nvidia-smi:



              terrance@terrance-ubuntu:~$ nvidia-smi 
              Sat Mar 23 20:52:18 2019
              +-----------------------------------------------------------------------------+
              | NVIDIA-SMI 418.43 Driver Version: 418.43 CUDA Version: 10.1 |
              |-------------------------------+----------------------+----------------------+
              | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
              | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
              |===============================+======================+======================|
              | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
              | 43% 41C P8 N/A / N/A | 122MiB / 1998MiB | N/A Default |
              +-------------------------------+----------------------+----------------------+

              +-----------------------------------------------------------------------------+
              | Processes: GPU Memory |
              | GPU PID Type Process name Usage |
              |=============================================================================|
              | 0 Not Supported |
              +-----------------------------------------------------------------------------+






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 12 mins ago

























              answered Sep 20 '18 at 22:13









              TerranceTerrance

              20.2k34898




              20.2k34898







              • 1





                Note that as of 2018-11 you need cuda 0.9 for tensorflow.

                – mathtick
                Nov 24 '18 at 12:10






              • 1





                installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

                – fccoelho
                Jan 24 at 15:50











              • @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

                – Terrance
                Jan 24 at 16:39












              • 1





                Note that as of 2018-11 you need cuda 0.9 for tensorflow.

                – mathtick
                Nov 24 '18 at 12:10






              • 1





                installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

                – fccoelho
                Jan 24 at 15:50











              • @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

                – Terrance
                Jan 24 at 16:39







              1




              1





              Note that as of 2018-11 you need cuda 0.9 for tensorflow.

              – mathtick
              Nov 24 '18 at 12:10





              Note that as of 2018-11 you need cuda 0.9 for tensorflow.

              – mathtick
              Nov 24 '18 at 12:10




              1




              1





              installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

              – fccoelho
              Jan 24 at 15:50





              installation of nvidia-driver-410 fails because it depends on xserver-xorg-video-nvidia-410 and it can't be installed because it depnds on a bunch of lbnvidia which are not available

              – fccoelho
              Jan 24 at 15:50













              @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

              – Terrance
              Jan 24 at 16:39





              @fccoelho Every file that is needed is in that repo. Unless you performed a step incorrectly or that you are using an unsupported or a different version than 18.04 which this was written for, then you might not be installing those drivers.

              – Terrance
              Jan 24 at 16:39













              2














              Ubuntu 16.04, CUDA 9.2 and NVIDIA 396 drivers:



              NOTE: NVIDIA's repo here has decided to push the 410 drivers. I will do some testing to see if I can get it to set for the driver you want installed.



              These instructions are for installing CUDA through the repository instead of the .deb installation.



              The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



              Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



              sudo rm /etc/apt/sources.list.d/cuda*
              sudo apt remove nvidia-cuda-toolkit


              Recommended to also remove all NVIDIA drivers before installing new drivers:



              sudo apt remove nvidia-*


              Then update the system:



              sudo apt update


              Install the key:



              sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub


              Add the repo:



              sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


              Update for the new repo being added:



              sudo apt update


              Install CUDA 9.2:



              sudo apt install cuda-9-2


              It should be installing the nvidia-396 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/



              Verify that CUDA 9.2 was installed:



              ~$ ls /usr/local/cuda-9.2/
              bin include libnvvp nvml samples targets
              doc lib64 LICENSE nvvm share tools
              extras libnsight nsightee_plugins README src version.txt


              Now, add the following to your ~/.profile for the PATH and LD_LIBRARY. You can use the command gedit ~/.profile for editing:



              # set PATH for cuda 9.2 installation
              if [ -d "/usr/local/cuda-9.2/bin/" ]; then
              export PATH=/usr/local/cuda-9.2/bin$PATH:+:$PATH
              export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
              fi


              Reboot your system.



              sudo reboot


              Once the system is up, you can verify the installation by typing in the following:



              nvcc -V


              You should see something similar the following:



              ~$ nvcc -V
              nvcc: NVIDIA (R) Cuda compiler driver
              Copyright (c) 2005-2017 NVIDIA Corporation
              Built on Fri_Nov__3_21:07:56_CDT_2017
              Cuda compilation tools, release 9.1, V9.1.85


              And you should see the 396.xx drivers installed:



              ~$ nvidia-smi
              Thu May 17 07:38:54 2018
              +-----------------------------------------------------------------------------+
              | NVIDIA-SMI 396.44 Driver Version: 396.44 |
              |-------------------------------+----------------------+----------------------+
              | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
              | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
              |===============================+======================+======================|
              | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
              | 49% 53C P0 N/A / N/A | 187MiB / 1999MiB | N/A Default |
              +-------------------------------+----------------------+----------------------+

              +-----------------------------------------------------------------------------+
              | Processes: GPU Memory |
              | GPU PID Type Process name Usage |
              |=============================================================================|
              | 0 Not Supported |
              +-----------------------------------------------------------------------------+







              share|improve this answer





























                2














                Ubuntu 16.04, CUDA 9.2 and NVIDIA 396 drivers:



                NOTE: NVIDIA's repo here has decided to push the 410 drivers. I will do some testing to see if I can get it to set for the driver you want installed.



                These instructions are for installing CUDA through the repository instead of the .deb installation.



                The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                sudo rm /etc/apt/sources.list.d/cuda*
                sudo apt remove nvidia-cuda-toolkit


                Recommended to also remove all NVIDIA drivers before installing new drivers:



                sudo apt remove nvidia-*


                Then update the system:



                sudo apt update


                Install the key:



                sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub


                Add the repo:



                sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                Update for the new repo being added:



                sudo apt update


                Install CUDA 9.2:



                sudo apt install cuda-9-2


                It should be installing the nvidia-396 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/



                Verify that CUDA 9.2 was installed:



                ~$ ls /usr/local/cuda-9.2/
                bin include libnvvp nvml samples targets
                doc lib64 LICENSE nvvm share tools
                extras libnsight nsightee_plugins README src version.txt


                Now, add the following to your ~/.profile for the PATH and LD_LIBRARY. You can use the command gedit ~/.profile for editing:



                # set PATH for cuda 9.2 installation
                if [ -d "/usr/local/cuda-9.2/bin/" ]; then
                export PATH=/usr/local/cuda-9.2/bin$PATH:+:$PATH
                export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                fi


                Reboot your system.



                sudo reboot


                Once the system is up, you can verify the installation by typing in the following:



                nvcc -V


                You should see something similar the following:



                ~$ nvcc -V
                nvcc: NVIDIA (R) Cuda compiler driver
                Copyright (c) 2005-2017 NVIDIA Corporation
                Built on Fri_Nov__3_21:07:56_CDT_2017
                Cuda compilation tools, release 9.1, V9.1.85


                And you should see the 396.xx drivers installed:



                ~$ nvidia-smi
                Thu May 17 07:38:54 2018
                +-----------------------------------------------------------------------------+
                | NVIDIA-SMI 396.44 Driver Version: 396.44 |
                |-------------------------------+----------------------+----------------------+
                | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
                | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
                |===============================+======================+======================|
                | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
                | 49% 53C P0 N/A / N/A | 187MiB / 1999MiB | N/A Default |
                +-------------------------------+----------------------+----------------------+

                +-----------------------------------------------------------------------------+
                | Processes: GPU Memory |
                | GPU PID Type Process name Usage |
                |=============================================================================|
                | 0 Not Supported |
                +-----------------------------------------------------------------------------+







                share|improve this answer



























                  2












                  2








                  2







                  Ubuntu 16.04, CUDA 9.2 and NVIDIA 396 drivers:



                  NOTE: NVIDIA's repo here has decided to push the 410 drivers. I will do some testing to see if I can get it to set for the driver you want installed.



                  These instructions are for installing CUDA through the repository instead of the .deb installation.



                  The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                  Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                  sudo rm /etc/apt/sources.list.d/cuda*
                  sudo apt remove nvidia-cuda-toolkit


                  Recommended to also remove all NVIDIA drivers before installing new drivers:



                  sudo apt remove nvidia-*


                  Then update the system:



                  sudo apt update


                  Install the key:



                  sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub


                  Add the repo:



                  sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                  Update for the new repo being added:



                  sudo apt update


                  Install CUDA 9.2:



                  sudo apt install cuda-9-2


                  It should be installing the nvidia-396 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/



                  Verify that CUDA 9.2 was installed:



                  ~$ ls /usr/local/cuda-9.2/
                  bin include libnvvp nvml samples targets
                  doc lib64 LICENSE nvvm share tools
                  extras libnsight nsightee_plugins README src version.txt


                  Now, add the following to your ~/.profile for the PATH and LD_LIBRARY. You can use the command gedit ~/.profile for editing:



                  # set PATH for cuda 9.2 installation
                  if [ -d "/usr/local/cuda-9.2/bin/" ]; then
                  export PATH=/usr/local/cuda-9.2/bin$PATH:+:$PATH
                  export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                  fi


                  Reboot your system.



                  sudo reboot


                  Once the system is up, you can verify the installation by typing in the following:



                  nvcc -V


                  You should see something similar the following:



                  ~$ nvcc -V
                  nvcc: NVIDIA (R) Cuda compiler driver
                  Copyright (c) 2005-2017 NVIDIA Corporation
                  Built on Fri_Nov__3_21:07:56_CDT_2017
                  Cuda compilation tools, release 9.1, V9.1.85


                  And you should see the 396.xx drivers installed:



                  ~$ nvidia-smi
                  Thu May 17 07:38:54 2018
                  +-----------------------------------------------------------------------------+
                  | NVIDIA-SMI 396.44 Driver Version: 396.44 |
                  |-------------------------------+----------------------+----------------------+
                  | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
                  | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
                  |===============================+======================+======================|
                  | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
                  | 49% 53C P0 N/A / N/A | 187MiB / 1999MiB | N/A Default |
                  +-------------------------------+----------------------+----------------------+

                  +-----------------------------------------------------------------------------+
                  | Processes: GPU Memory |
                  | GPU PID Type Process name Usage |
                  |=============================================================================|
                  | 0 Not Supported |
                  +-----------------------------------------------------------------------------+







                  share|improve this answer















                  Ubuntu 16.04, CUDA 9.2 and NVIDIA 396 drivers:



                  NOTE: NVIDIA's repo here has decided to push the 410 drivers. I will do some testing to see if I can get it to set for the driver you want installed.



                  These instructions are for installing CUDA through the repository instead of the .deb installation.



                  The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                  Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                  sudo rm /etc/apt/sources.list.d/cuda*
                  sudo apt remove nvidia-cuda-toolkit


                  Recommended to also remove all NVIDIA drivers before installing new drivers:



                  sudo apt remove nvidia-*


                  Then update the system:



                  sudo apt update


                  Install the key:



                  sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub


                  Add the repo:



                  sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                  Update for the new repo being added:



                  sudo apt update


                  Install CUDA 9.2:



                  sudo apt install cuda-9-2


                  It should be installing the nvidia-396 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/



                  Verify that CUDA 9.2 was installed:



                  ~$ ls /usr/local/cuda-9.2/
                  bin include libnvvp nvml samples targets
                  doc lib64 LICENSE nvvm share tools
                  extras libnsight nsightee_plugins README src version.txt


                  Now, add the following to your ~/.profile for the PATH and LD_LIBRARY. You can use the command gedit ~/.profile for editing:



                  # set PATH for cuda 9.2 installation
                  if [ -d "/usr/local/cuda-9.2/bin/" ]; then
                  export PATH=/usr/local/cuda-9.2/bin$PATH:+:$PATH
                  export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                  fi


                  Reboot your system.



                  sudo reboot


                  Once the system is up, you can verify the installation by typing in the following:



                  nvcc -V


                  You should see something similar the following:



                  ~$ nvcc -V
                  nvcc: NVIDIA (R) Cuda compiler driver
                  Copyright (c) 2005-2017 NVIDIA Corporation
                  Built on Fri_Nov__3_21:07:56_CDT_2017
                  Cuda compilation tools, release 9.1, V9.1.85


                  And you should see the 396.xx drivers installed:



                  ~$ nvidia-smi
                  Thu May 17 07:38:54 2018
                  +-----------------------------------------------------------------------------+
                  | NVIDIA-SMI 396.44 Driver Version: 396.44 |
                  |-------------------------------+----------------------+----------------------+
                  | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
                  | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
                  |===============================+======================+======================|
                  | 0 GeForce GTX 760 Off | 00000000:02:00.0 N/A | N/A |
                  | 49% 53C P0 N/A / N/A | 187MiB / 1999MiB | N/A Default |
                  +-------------------------------+----------------------+----------------------+

                  +-----------------------------------------------------------------------------+
                  | Processes: GPU Memory |
                  | GPU PID Type Process name Usage |
                  |=============================================================================|
                  | 0 Not Supported |
                  +-----------------------------------------------------------------------------+








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 22 '18 at 21:26

























                  answered Sep 20 '18 at 22:11









                  TerranceTerrance

                  20.2k34898




                  20.2k34898





















                      1














                      Ubuntu 14.04, CUDA 10.0 and NVIDIA 410 drivers:



                      Please note that I don't have Ubuntu 14.04 installed so I cannot verify if these steps work or not. But according to http://developer.download.nvidia.com/compute/cuda/repos/ from NVIDIA, it should be the same steps as I have listed in the other two answers.



                      These instructions are for installing CUDA through the repository instead of the .deb installation.



                      The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                      Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                      sudo rm /etc/apt/sources.list.d/cuda*
                      sudo apt remove nvidia-cuda-toolkit


                      Recommended to also remove all NVIDIA drivers before installing new drivers:



                      sudo apt remove nvidia-*


                      Then update the system:



                      sudo apt update


                      Install the key:



                      sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub


                      Add the repo:



                      sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                      Update the system again:



                      sudo apt update


                      Install CUDA 10.0.



                      sudo apt install cuda-10-0


                      It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/



                      Add the following lines to your ~/.profile file for CUDA 10.0



                      # set PATH for cuda 10.0 installation
                      if [ -d "/usr/local/cuda-10.0/bin/" ]; then
                      export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
                      export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                      fi


                      Reboot the computer and check your settings when reboot is complete:



                      Check NVIDIA Cuda Compiler with nvcc --version:



                      Check NVIDIA driver with nvidia-smi:






                      share|improve this answer



























                        1














                        Ubuntu 14.04, CUDA 10.0 and NVIDIA 410 drivers:



                        Please note that I don't have Ubuntu 14.04 installed so I cannot verify if these steps work or not. But according to http://developer.download.nvidia.com/compute/cuda/repos/ from NVIDIA, it should be the same steps as I have listed in the other two answers.



                        These instructions are for installing CUDA through the repository instead of the .deb installation.



                        The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                        Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                        sudo rm /etc/apt/sources.list.d/cuda*
                        sudo apt remove nvidia-cuda-toolkit


                        Recommended to also remove all NVIDIA drivers before installing new drivers:



                        sudo apt remove nvidia-*


                        Then update the system:



                        sudo apt update


                        Install the key:



                        sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub


                        Add the repo:



                        sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                        Update the system again:



                        sudo apt update


                        Install CUDA 10.0.



                        sudo apt install cuda-10-0


                        It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/



                        Add the following lines to your ~/.profile file for CUDA 10.0



                        # set PATH for cuda 10.0 installation
                        if [ -d "/usr/local/cuda-10.0/bin/" ]; then
                        export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
                        export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                        fi


                        Reboot the computer and check your settings when reboot is complete:



                        Check NVIDIA Cuda Compiler with nvcc --version:



                        Check NVIDIA driver with nvidia-smi:






                        share|improve this answer

























                          1












                          1








                          1







                          Ubuntu 14.04, CUDA 10.0 and NVIDIA 410 drivers:



                          Please note that I don't have Ubuntu 14.04 installed so I cannot verify if these steps work or not. But according to http://developer.download.nvidia.com/compute/cuda/repos/ from NVIDIA, it should be the same steps as I have listed in the other two answers.



                          These instructions are for installing CUDA through the repository instead of the .deb installation.



                          The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                          Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                          sudo rm /etc/apt/sources.list.d/cuda*
                          sudo apt remove nvidia-cuda-toolkit


                          Recommended to also remove all NVIDIA drivers before installing new drivers:



                          sudo apt remove nvidia-*


                          Then update the system:



                          sudo apt update


                          Install the key:



                          sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub


                          Add the repo:



                          sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                          Update the system again:



                          sudo apt update


                          Install CUDA 10.0.



                          sudo apt install cuda-10-0


                          It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/



                          Add the following lines to your ~/.profile file for CUDA 10.0



                          # set PATH for cuda 10.0 installation
                          if [ -d "/usr/local/cuda-10.0/bin/" ]; then
                          export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
                          export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                          fi


                          Reboot the computer and check your settings when reboot is complete:



                          Check NVIDIA Cuda Compiler with nvcc --version:



                          Check NVIDIA driver with nvidia-smi:






                          share|improve this answer













                          Ubuntu 14.04, CUDA 10.0 and NVIDIA 410 drivers:



                          Please note that I don't have Ubuntu 14.04 installed so I cannot verify if these steps work or not. But according to http://developer.download.nvidia.com/compute/cuda/repos/ from NVIDIA, it should be the same steps as I have listed in the other two answers.



                          These instructions are for installing CUDA through the repository instead of the .deb installation.



                          The following lines you can copy and paste to a terminal window. Press Ctrl+Alt+T to open a terminal window.



                          Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:



                          sudo rm /etc/apt/sources.list.d/cuda*
                          sudo apt remove nvidia-cuda-toolkit


                          Recommended to also remove all NVIDIA drivers before installing new drivers:



                          sudo apt remove nvidia-*


                          Then update the system:



                          sudo apt update


                          Install the key:



                          sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub


                          Add the repo:



                          sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list'


                          Update the system again:



                          sudo apt update


                          Install CUDA 10.0.



                          sudo apt install cuda-10-0


                          It should be installing the nvidia-410 drivers with it as those are what are listed in the repo. See: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/



                          Add the following lines to your ~/.profile file for CUDA 10.0



                          # set PATH for cuda 10.0 installation
                          if [ -d "/usr/local/cuda-10.0/bin/" ]; then
                          export PATH=/usr/local/cuda-10.0/bin$PATH:+:$PATH
                          export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH
                          fi


                          Reboot the computer and check your settings when reboot is complete:



                          Check NVIDIA Cuda Compiler with nvcc --version:



                          Check NVIDIA driver with nvidia-smi:







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 21 '18 at 3:34









                          TerranceTerrance

                          20.2k34898




                          20.2k34898



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1077061%2fhow-do-i-install-nvidia-and-cuda-drivers-into-ubuntu%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                              Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                              Torre de la Isleta Índice Véase también Referencias Bibliografía Enlaces externos Menú de navegación38°25′58″N 0°23′02″O / 38.43277778, -0.3838888938°25′58″N 0°23′02″O / 38.43277778, -0.38388889Torre de la Illeta de l’Horta o Torre Saleta. Base de datos de bienes inmuebles. Patrimonio Cultural. Secretaría de Estado de CulturaFicha BIC Torre de la Illeta de l’Horta. Dirección General de Patrimonio Cultural. Generalitat ValencianaLugares de interés. Ayuntamiento del CampelloTorre de la Isleta en CastillosNet.org