Nvidia-utils-410 screen-resolution-extra xserver-xorg-video-nvidia-410 Nvidia-kernel-source-410 nvidia-modprobe nvidia-prime nvidia-settings Nvidia-dkms-410 nvidia-driver-410 nvidia-kernel-common-410 Libxmu-dev libxmu-headers libxnvctrl0 libxt-dev nvidia-compute-utils-410 Libnvidia-encode-410 libnvidia-fbc1-410 libnvidia-gl-410 libnvidia-ifr1-410 Libnvidia-cfg1-410 libnvidia-common-410 libnvidia-decode-410 How would I do this ? sudo apt-get remove -purge cuda It will print both, the CPU and GPU for the computer something like in figure 8.I want to uninstall cuda 9.1 since I just installed cuda 10. This line would print out the list of processor available for the tensorflow to use. import tensorflow as tf from import device_lib print(device_lib.list_local_devices()) Check whether GPU is available for the tensorflow using below line of code. When the installation is completed, open Jupyter Notebook and import tensorflow. ![]() Now install tensorflow-gpu using pip install tensorflow-gpu or conda install -c anaconda tensorflow-gpu. ![]() Just to be sure, Uninstall tensorflow if it is already installed in the library by pip uninstall tensorflow. Use pip list or conda list to get the list of packages installed. Before we install tensorflow-gpu, ensure that you do not have tensorflow cpu already installed in Anaconda. We will be installing tensorflow in Anaconda hence open “Anaconda Prompt”. Now all the prerequisites for tensorflow are done and we can dive into actually installing the tensorflow-gpu library. Restart your computer one last time to get all the driver files and cuDNN files right where they are needed. While installing you don’t necessarily have to give any preferences, use the default options which the installation suggests.Īfter updating the drivers, download and install the CUDA Toolkit from this link: Make sure you download the community version, which is free for the students and individuals. You can download the latest version here. Once you have the latest drivers, install Microsoft Visual Studio. This can be done from the official Nvidia website: And if your Graphics card is compatible with the CUDA Toolkit then go ahead and update the Nvidia drivers first. You can instead work on Google Colab or Kaggle. There’s no point installing tensorflow-GPU if you graphics card doesn’t support CUDA parallel processing. This can be checked on the Nvidia website link: ![]() First you need to check if your graphics card supports CUDA. Assuming that you already have or know how to install Anaconda and Python, lets get started with installing Tensorflow-GPU. I have a Nvidia GeForce 940M graphics card, and I have Python 3.7 version and Anaconda 4.8.3. So i thought of putting it all in a single page so that someone new doesn’t has to struggle. It took me more than a month to get the right codes and process. I had to try many different codes and tricks from various sources. I updated my Nvidia drivers, CUDA Toolkit and my tensorflow without any luck.Īfter a lot web search and trials i was finally able to get codes to run on GPU instead of CPU. So, I was trying to use my GPU for the running a tensorflow code, but everytime it would run on CPU.
0 Comments
Leave a Reply. |