Posts

Showing posts with the label CUDA

How to Setup TensorFlow GPU for accelerated Machine Learning and Cloud Portability

Image
Setting up TensorFlow is as simple as issuing: pip3 install tensorflow . This setup only uses your CPU to perform the calculations. To enable GPU support requires installing Nvidia drivers, CUDA toolkit, and cuDNN libraries and potential of spending hours troubleshooting installation dependencies. But as Andriy Lazorenko demonstrates with a common laptop setup  using a low-end Geforce MX945 GPU can provide three times the performance over the Intel Core i7 7500U CPU. If you have access to higher end GPUs you can realistically get 15x or more performance gains. That's the difference between waiting for an hour, or under 4 minutes to complete the same task! While it's possible to install everything locally on your computer . I recommend using Docker and building a container for each Tensorflow project you create for these reasons: 1) Cloud Portability Ready Ultimately, there may come a time that you will need more powerful hardware. Working with Docker co...

How To Install Nvidia CUDA 9.0 Toolkit on Ubuntu 18.04

Image
If the purpose of installing the CUDA toolkit 9.0 on Ubuntu 18.04 is purely to use tensorflow - gpu , I strongly advise you to use the Docker method documented here , as you get better hardware and code isolation and easy portability to the cloud later. TensorFlow Docker Installation  incorrectly indicates that the host machine needs the CUDA toolkit and cuDNN libraries to be installed on the host machine. This is not true. I have reached out Tensorflow community to correct this. How To If you need to install CUDA 9.0 toolkit on Ubuntu 18.04, here are the instructions. Uninstall Nvidia Drivers Uninstall any Nvidia drivers. To uninstall do: sudo apt-get remove --purge nvidia-* sudo apt-get remove --purge libnvidia-* This will avoid any versioning conflicts. CUDA Toolkit 9.0 and 9.1 requires nvidia-390_390.30 drivers.  Install CUDA Toolkit 9.0 (using Ubuntu 17.04 repository meta-data) The CUDA Toolkit is available at  https://developer.nvidia.com/cuda...

Failed CUDA Toolkit Install? Ubuntu 18.04 stuck on boot of Gnome Display Manager?

Image
I have been attempting to get TensorFlow GPU running on Ubuntu 18.04. The system requirements are simple:  TensorFlow GPU NVIDIA requirements . But I discovered the CUDA toolkit can result in some messy installation dependencies on specific versions of the Nvidia drivers leaving you with failed package installations such as: Errors were encountered while processing: /tmp/apt-dpkg-install-5dMwo8/100-nvidia-390_390.30-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) What's worse if you reboot your computer you are met with a computer that is stuck booting, the system not able to progress past loading the Gnome Display Manager. Is my computer completely messed up? If you are stuck at boot up sequence access a tty terminal by pressing  ctrl + alt + F2 . You will be prompted to login in. Do it. Next, type: sudo apt-get install -f The system will list dependencies that were not installed correctly. In my case, my installed ...