I used to work on a Mac and don’t bother configuring for Deep Learning. However, as Windows is not supported by nvidia_docker, I had to find a way. Here is my new Deep Learning development setup on Windows 10.
We’ll cover how to set up:
- Windows Subsystem for Linux
- Zsh and Oh My Zsh
- A pretty terminal with Hyper.Js
- Deep Learning environment
Recently, Microsoft has put a lot of effort into attracting developers on Windows and as a consequence, they released Windows Subsystem for Linux. It enables to run most common command-line tools, utilities, and applications directly on Windows without the overhead of a virtual machine.
To begin with, the Windows Subsystem for Linux feature needs to be enabled via a Powershell prompt as an administrator:
Reboot your computer.
Then, since Fall Creators Update you can directly install a Linux distro via Microsoft Store.
You’ll find more detailed instructions on the Microsoft documentation. For this tutorial, I have chosen Ubuntu 16.04.
Oh My Zsh
To begin with, install zsh via the command line:
then set it as your default shell by inserting at the top of
Get rid of your host description by adding at the top of your
Install Oh My Zsh
You can get Oh My Zsh with this command:
You can install plugins for your own comfort like autocompletion for Docker, Git via
~/.zshrc. I use the agnoster theme.
Finally, edit the shell path in config by setting
Prettify the output
Here is a little trick1 to prettify the output, because it is quite ugly by default. Add the following to your
Deep Learning environment
To begin with, you need to create a Python environment via Anaconda. Go the official website and download the Anaconda 64-bit installer for Windows.
Once installed, you can open the Anaconda Prompt to update conda (
conda update conda) and basic packages (
conda update --all). You can easily create a new
deep_learning environment and install the packages you want (like numpy, scipy, tensorflow, tensorflow-gpu, keras, Pillow).
Download Cuda Toolkit 9.2 via Nvidia website.
Note that depending on how old you GPU is, you might need to install an older version of CUDA.
In order to download the final piece, you need to sign up for Nvidia Developer. Agree to the terms, and download cuDNN v7.2.1 Library for Windows 10 or whatever version dedicated to the version of CUDA you downloaded.
It’s time to test!
Copy the Python script from Keras example concerning MNIST dataset and verify the output, it should use your GPU and take between 15-20 sec per epoch.
Now you’re good to go! Let me know if you found it useful or if you have any questions.
Credits to lloydstubber ↩