Installing Ubuntu 16.04 accompany with Windows 10 for Deep Learning with Tensorflow

May 4, 2018 - 3 minute read - Category: Tech

This article is an introduction of my configuration when installing Ubuntu on a PC with Windows.

  1. Add a new SSD/hard drive in the PC
  2. Go to the windows system, delete the volume of the new hard drive in disk utility in the Windows OS. Remember the drive size in MB of the drive for later use.
  3. Download and burn the ubuntu 16.04 iso into a new USB drive with software like UltraISO
  4. Reboot the machine, enter the BIOS mode (pressing DEL or F2 when reloading for ASUS motherboard), select the USB driver as the starting partition and then reboot.
  5. When loaded, choose try Ubuntu rather than install ubuntu
  6. In the Ubuntu desktop, click install Ubuntu.
  7. After some configurations, e.g., decide whether or not download files when installing, which is not suggested for users in China, here comes the most important procedure: partition the new volume.
    1. Find and select the drive you deleted in Windows. You can see it is indicated /Vacant/ in the list and you can confirm by checking the size of hard drive.
    2. Click the plus sign in the left bottom of the list and:
      1. Add a SWAP volume, choosing the Main partition, Beginning of this space, and SWAP. This is for extended RAM, set the size about same as your RAM, e.g., 4096 for a RAM of 4GB.
      2. Add a UEFI volume, choosing the Logical partition, Beginning of this space, and UEFI/System. This is for Boot file system. 512MB seems to be OK.
      3. Add a system file disk, choosing Logical partition, Beginning of this space, and Ext4, assign 30GB seems OK. Remember to select the boot location as /.
      4. Add a user file disk, choosing Logical partition, Beginning of this space, and Ext4, assign as large as possible for your personal file. Remember to select the boot location as /home.
  8. Click install and wait.

  9. After installation, you should install CUDA and cuDNN support for Nvidia GPU. According to the introduction in TensorFlow Framework & GPU Acceleration : NVIDIA Data Center, we are able to successfully install the GPU support. But here are some tips:
    1. In procedure 1. Update/install NVIDIA drivers in this intro, the process may not yield good results. Instead, I tried to install this way:
      1. Click the Ubuntu icon in the left-up side of the desktop and search additional drivers.
      2. After Open, check the Additional Drivers and choose ` Using NVIDIA binary driver - version xxx.xx from nvidia-xx. The xx` indicates the version available to you. Generally, choose the newest for you.
    2. Installing corresponding CUDA and cuDNN version for you TensorFlow. In my scenario, I installed TensorFlow 1.8 with CUDA 9.0 and cuDNN 7.1. Just change the file names in the introduction post shown above.
  10. Finally, if you encounter problems such as not being able to login in the system after restart, you should check How to disable UEFI Secure Boot for your motherboard.

Hope this work for you.