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.
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.
No comments:
Post a Comment