Installing Ubuntu 16.04 accompany with Windows 10 for Deep Learning with Tensorflow
This article is an introduction of my configuration when installing Ubuntu on a PC with Windows.
- Add a new SSD/hard drive in the PC
- 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.
- Download and burn the ubuntu 16.04 iso into a new USB drive with software like UltraISO
- 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.
- When loaded, choose try Ubuntu rather than install ubuntu
- In the Ubuntu desktop, click install Ubuntu.
- 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.
- 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.
- Click the plus sign in the left bottom of the list and:
- 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.
- 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.
- 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
/
. - 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
.
-
Click install and wait.
- 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:
- In procedure
1. Update/install NVIDIA drivers
in this intro, the process may not yield good results. Instead, I tried to install this way:- Click the Ubuntu icon in the left-up side of the desktop and search
additional drivers
. - 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.
- Click the Ubuntu icon in the left-up side of the desktop and search
- 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.
- In procedure
- 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.