1

I have the latest ubuntu 18 installed just an hour ago. I have the newest anaconda 3.7 installed maybe 20 minutes ago. Then I proceeded to use

conda install pytorch torchvision -c pytorch

but when I open use python3 it still gives me

alex@alex:~$ python3
Python 3.7.0 (default, Jun 28 2018, 13:15:42) 
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>> 

To be sure, I do have a gpu in my computer:

alex@alex:~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)

I have also restarted my computer after the installing pytorch and it did not change anything. This is my second attempt at getting GPU to work on pytorch, my last attempt was on Lubuntu a few days ago using pip install and I installed some Nvidia drivers but still couldn't get it to work so i started anew.

  • Is the VGA driver for your card correctly installed? Check https://askubuntu.com/questions/1045241/ubuntu-18-04-how-do-i-install-drivers-for-my-nvidia-geforce-gtx-1050 – Mr.Michael.Schulze Dec 12 '18 at 11:48

3 Answers3

1

Just found a solution, maybe.... Check https://ubuntuforums.org/showthread.php?t=2377560 for details.

Maybe you have a hybrid graphic card and this can cause a wrong installation of driver. Please also check that secure boot is disabled in bios.

Run in terminal:

sudo apt purge nvidia*
sudo apt update
sudo ubuntu-drivers autoinstall
sudo apt full-upgrade

Reboot and check again.

0

As I can see you have done "normal" installation of PyTorch, which is at the moment CUDA 9.

I just checked the NVIDIA CUDA 9 Documentation , Ubuntu 18 is not supported in this case. If you want to use CUDA on Ubuntu 18, then you have to use CUDA 10 according to documentation.

0

Firsly ensure than CUDA is correctly installed. You can use https://developer.nvidia.com/cuda-zone to install the last version for your system