I would like to know what the external GPU (eGPU) options are for macOS in 2017 with the late 2016 MacBook Pro.
I did my research, however on the internet I find a lot of confusing information. Some say it can work, but it requires Windows (dual-boot). Others say, it can only work for the older graphics cards as CUDA is not supported for the newer graphics cards (GTX 1080). Ideally, I would like to run the 1080 GTX of NVIDIA. My only purpose is to use Keras and TensorFlow with it. However, I do not know all the things that are important to get it to work. My question therefore is, is it possible to use TensorFlow with CUDA and eGPU on the late MacBook Pro 2016 (15")? I want to use the graphics card in macOS (with late MacBook Pro 15") as an eGPU (no dual-boot/Windows/Linux partition).
Side note: I have seen users making use of eGPU's on macbook's before (Razor Core, AKiTiO Node), but never in combination with CUDA and Machine Learning (or the 1080 GTX for that matter). People suggested renting server space instead, or using Windows (better graphics card support) or even building a new PC for the same price that allows you to use a eGPU on Mac. (I do not prefer that option.)
Best Answer
I could finally install Nvidia Titan XP + MacBook Pro + Akitio Node + Tensorflow + Keras
I wrote a gist with the procedure, hope it helps
https://gist.github.com/jganzabal/8e59e3b0f59642dd0b5f2e4de03c7687
Here is what I did:
This configuration worked for me, hope it helps
It is based on: https://becominghuman.ai/deep-learning-gaming-build-with-nvidia-titan-xp-and-macbook-pro-with-thunderbolt2-5ceee7167f8b
and on: https://stackoverflow.com/questions/44744737/tensorflow-mac-os-gpu-support
Hardware
Software versions
Procedure:
Install GPU driver
When your mac restarted, run this command in Terminal:
Unplug your eGPU from your Mac, and restart. This is important if you did not unplug your eGPU you may end up with black screen after restarting.
When your Mac restarted, Open up Terminal and execute this command:
Install CUDA, cuDNN, Tensorflow and Keras
At this moment, Keras 2.08 needs tensorflow 1.0.0. Tensorflow-gpu 1.0.0 needs CUDA 8.0 and cuDNN v5.1 is the one that worked for me. I tried other combinations but doesn't seem to work
Set env variables
(If your bash_profile does not exist, create it. This is executed everytime you open a terminal window)
Copy cuDNN files to CUDA
Create envirenment and install tensorflow
Verify it works
Run the following script:
Install Keras in the envirenment and set tensorflow as backend:
Output: