Installation and configuration of Anaconda on Ubuntu

By | 2017-03-26T19:56:46+00:00 March 30th, 2017|languages, Linux, machine learning, operating systems, python|

This is a quick post on how to install/configure Anaconda on Ubuntu. We will also create virtual environments using Anaconda. What is Anaconda? Anaconda is a package manager for Python which makes it easy to install and configure packages which are usually used for Data Science related work using Python. As we did using virtualenv package, we can also create virtual environments using Anaconda. This helps us to work on multiple projects using various versions of packages completely isolated, all in a single computer. Installing Anaconda Anaconda can be downloaded from here. The installer is ~500 MB in size. Once downloaded, execute the following command [...]

Always execute a program as a different user on Windows

By | 2017-03-26T15:47:25+00:00 March 29th, 2017|operating systems, Scripts, tools, Windows|

I like to create new scripts and automate the routine work. In order to test the scripts, at times I would like to execute those scripts under the credentials of a different users. In order to make my job easy, I would create a shortcut for that script. Run as a different user option in Windows GUI is a good option but the problem with this approach is that I need to enter the credentials of the users on each occasion. In this post I will explain how I create a shortcut for a program so that it runs as a different user but does not prompt [...]

The step by step guide to install TensorFlow on Windows

By | 2017-03-27T06:13:11+00:00 March 28th, 2017|languages, machine learning, operating systems, python, TensorFlow, Windows|

In the previous post we had installed TensorFlow in a virtualised environment on Ubuntu 16.04. In this post we will install TensorFlow on Windows 10 including all the pre-requisites. Since I have a laptop with NVIDIA GPU, I will install TensorFlow with GPU support. NVIDIA CUDA First of all we will install NVIDIA CUDA on Windows as installing TensorFlow with GPU support is recommended. We will download NIVIDIA CUDA from here. The installation is very straight forward, a few clicks and the installation is complete. Install Python 3.5 Once the CUDA installation is complete, initiate a reboot of the workstation. Then we need to install Python. On Windows TensorFlow supports versions 3.5.x versions [...]

How to install TensorFlow with GPU support using Python Virtualenv

By | 2017-03-26T19:59:36+00:00 March 27th, 2017|languages, Linux, machine learning, python, TensorFlow|

In this post I will install TensorFlow with GPU support using Virtualenv. I will be installing this on Ubuntu 16.04 however the steps will remain the same for other operating systems as well. Before we install TensorFlow please make sure that the following prerequisites are taken care of. Install NVIDIA CUDA (this if for GPU support) Install Virtualenv package on Python. The installation is pretty straight forward. First we need to create the Virtual environment using the following command [crayon-5a17e62460cc3027017681/] During the installation of virtualenv I had created a folder named myvirtualenv under my home directory. Hence I used that folder in the above command. [...]

Cannot access shared folder on VirtualBox guest Ubuntu OS

By | 2017-03-26T20:00:00+00:00 March 26th, 2017|Linux, operating systems, tools|

I had created a shared folder in VirtualBox for an Ubuntu VM that I had created. This shared folder was visible in the guest OS (Ubuntu) but when I tried to open it, it was failing with the following error. In order to access any shared folders in Ubuntu, the user should be part of the vboxsf group in Ubuntu. By default no users are part of this group. To resolve this error, all I had to do was the add the current user as a member of vboxsf group. Executing the following command from the terminal would do the job. [crayon-5a17e62463792988419431/] In order to add user [...]

Ubuntu Live boot results in frozen display on VirtualBox

By | 2017-03-26T17:16:55+00:00 March 25th, 2017|Linux, operating systems, tools|

In order to test few features of TensorFlow, I wanted to configure a Ubuntu VM on VirtualBox. For Virtual Machines I like the Lubuntu distribution of Ubuntu as it is light-weight and has all the important packages readily installed. Hence I got the Lubuntu ISO image and started a new VM. However within minutes of starting the VM, the display would get frozen and does not return back to normal display. I stumbled upon a few articles, forum entries which suggested the following options. Press Right Ctrl + F1 to switch to the shell Press Right Ctrl + F7 to switch back to the graphical display If the [...]

Installing Virtualenv on Ubuntu for Tensorflow

By | 2017-03-24T06:28:44+00:00 March 24th, 2017|languages, Linux, machine learning, python, TensorFlow, tools|

In my series on getting started with TensorFlow, we have looked into Finding whether the workstation has NVIDIA GPU or not Installing NVIDIA CUDA on Linux In this post I will explain how to install Virtualenv on Ubuntu 16.04. What is Virtualenv? Virtualenv is a package for Python by installing which we will be able to create virtual environments for Python development. It is like we can have multiple virtual instances of Python and it's packages all in a single operating system. Here is an example how Virtualenv is useful. Let's say I want to develop two Python 3 applications for which I will be [...]

Resolved | Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/index.php

By | 2017-03-20T21:23:08+00:00 March 23rd, 2017|AWS, Linux, Scripts|

I was using the following PHP file to test connectivity of MySQL instance hosted on Amazon RDS. [crayon-5a17e6246d0fc944476904/] A very basic script indeed. However when I try to browse this file from the web browser, I would get the following error. What a message to troubleshoot! Since this page was hosted on an Apache server, the first place to look for is the Apache log. Hence executed the following command to check Apache logs. [crayon-5a17e6246d113442414780/] [crayon-5a17e6246d11a096646379/] This made more sense. Line 5 in my code is calling mysqli_connect() function but Apache did not recognize it. That's when I remembered that I did not install the [...]

Installing CUDA Toolkit 8.0 on Ubuntu 16.04

By | 2017-03-21T10:39:00+00:00 March 22nd, 2017|Linux, machine learning, TensorFlow, tools|

As per TensorFlow documentation, following are the prerequisites to install TensorFlow with GPU support. In the previous post we tried various methods to find out if the GPU is from NVIDIA or not. In this post we will install NVIDIA CUDA on Linux. There few pre-installation steps to take care of. Here are some of the important ones GCC One of them is to ensure where GCC is installed or not. We can confirm it by executing the following command. [crayon-5a17e6247413a226926179/] Since I am using Ubuntu, GCC comes pre-installed and here is the output that I got. build essentials It is important have the build-essential package installed. This is [...]

Find GPU Information on Linux and Windows

By | 2017-03-20T21:24:07+00:00 March 21st, 2017|Linux, machine learning, operating systems, TensorFlow, Windows|

In the next few weeks I will be upgrading my skills on TensorFlow. As a step first I need to have TensorFlow installed on my laptop and VMs. As my regular readers on the blog you would know that Ubuntu is my primary operating system and I run Windows on my virtual machines for testing purposes. According to the installation page of TensorFlow, TensorFlow with GPU support (NVIDIA GPU) runs significantly faster than with CPU support only. The first question that comes to one's mind is what is GPU? As explained in this NVDIA's blog post, GPU is the Graphical Processing Unit of the computer [...]