Thread Tools
This thread is privately moderated by askman, who may elect to delete unwanted replies.
Nov 01, 2016, 12:31 PM
Destroyer of G-10
askman's Avatar
Thread OP
Discussion

Setting up Mac Pro for Deep Learning with Torch


I've been working with Deep Learning software called Torch for last month or so and had to setup a computer to run this software. Torch is based on AI software developed by Google called tensor flow that was open sourced last year. Deep learning software is very flexible and can be used in many application, especially with image recognition.

just take a look at this video.

(3 min 44 sec)


This field has been advancing fast and I wanted to get into it. Torch itself can run in any machine, but many of the newer libraries uses Cuda GPU to speed up the process . So, with almost no knowledge deep learning, I jumped in.

Torch requires either an Linux computer or Mac. It is also possible to run under VM using dockerized version of the code, but it will be more painful to get it going. So, I got an old 2008 Mac Pro with dual Xeon quadcore and 32gb of ram as a base. The code library that I wanted to run required Nvidia GPU with compute index of 5.0 or higher. This meant that I needed fairly new GPU that I didn't have. So, I purchased GTX-750 ti with 4gb for 100 bucks. Once I had all this on hand, I had to install everything and make it work. (which was pain in itself) Not having used unix or linux for a long time, it was bit of learning curve to get everything setup.

Why old Mac Pro?. well, they can be purchased really cheap and with dual 4 core xeon at 2.8ghz, it is no worse than latest 4 core/dual thread i5. it has beefy power supply and if you get it with all 8 slot of FB-Dimm filled, memory is actually faster than DDR3 due to having 8 channels. these machines can be picked up for under great price used.

Now, what I am writing here didn't happen this easily. It took me 2 days of pain to install everything to a point where it was running. I had to reinstall many times to get everything working properly. Once install fails for any reason, you have to start over,and lack of documentation didn't help. you can find most of the solution by google, but being able to recognize failure was part of the issue.

The 2008 Mac Pro had OSX 10.3 on it, but it could run OSX11 but not OSX 12. Due to OSX12 becoming available, 11 wasn't accessible from the app store. After searching on google, I found a link to 11 that allowed me to install . I did start with yosemite, but after couple failure to install, I wanted the latest version to reduce issues.

The mac pro came with Mac version of ATI5770 GPU, which is handy for setting up the GTX 750. to Run the GTX750, you need to download and run the OSX Webdriver. once this is installed, you can boot up using any nvidia card, but until that point, you will have blackscreen. Once 750 is running, you can pull the 5770. You have to make sure web driver is compatible with the version of the OSX you have.

Next step was installing Cuda developer's library. Upgrading to el capitan allowed me to run the latest version of the library. Finally I needed to install Xcode. (from the app store) I installed the latest version, but I could not get the torch to install properly with the code library that I am running . I found out that I needed version 6.3 of xcode, and it was bit of pain to find it in the app store. Doing search on google allowed me to find and install it.

Once these library was installed, I could go ahead and install torch and all the libraries that I needed to run. If you are running without GPU though, it is very simple to get things working. Torch by itself installs pretty easy. it is the cuda library that was more trouble.

Once Torch is installed, Real fun begins. For running pretrained model of codebase like neural talk, it should be straight forward. Training your own model is different level of pain though and having multiple, expensive GPU is recommended. Most of the researchers run multiple GTX Titan X that cost almost 1k bucks each. . I would love a 1080 with 8gb at500 bucks or so, but 750 ti with 4gb is usable.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools