From Wikicliki
Jump to: navigation, search

With programming experience (python):

Mac OS X:

  • You need an NVidia Graphics card GPU that is on this list in order to be able to run CUDA/Caffe. Find out your GPU by clicking 'About Your Mac' > 'More Info...' > Graphics. Mine was Intel, so I cant use CUDA/Caffe. If you cant use CUDA then its possible to do this stuff on Caffee with the CPU rather than GPU, but its much much much much much slower, and....
  • If you don't have NVidia graphics card then your best bet is using an Amazon instance with an already set up AMI. This is maybe the fastest way of all to setup deepdream. However you will need to create an account and pay possible a couple $ for server costs with your credit/debit card. Best guide available: EDIT: also this guy here is using an Amazon EC2 g2.2xlarge and has written a guide on getting it up and running really fast
  • If you have NVidia graphics card and can run CUDA:
  • (An alternative guide to mine below is here: . It uses homebrew to install CUDA, which will save you some time. Some say its working but others have problems.)
  • Install Anaconda
  • If you do not have Homebrew package manager then install it now: . If you are already using another package manager like macports... idk what is best for you - multiple package managers can clash sometimes.
  • Install XCode from Apple if you dont have it already. v6.4 is fine.
  • Check you have clang by typing into your terminal: 'clang --help'. Hopefully you have it already but if you dont have it then try installing it through homebrew (untested).
  • Follow these steps to download CUDA 7 from Nvidia. If your Mac is moderately new then this should not be too tricky.
  • if after running 'xcode-select --install' your Xcode is updated then DO run that same command again.
  • if you have the prerequisites sorted then download the CUDA dmg from here under the Mac OS X tab. Once downloaded run CUDAMacOSXInstaller.
  • If you get this error: “CUDAMacOSXInstaller” is an application downloaded from the Internet. Then go to System Preferences > Security & Privacy > General -> (unlock) -> * * Allow apps downloaded from anywhere. Then run CUDAMacOSXInstaller again.
  • When prompted install the Driver and Toolkit. Samples are optional but worth getting to test installation.
  • Once complete (takes 10mins+) test the installation by taking the verification steps.
  • (CUDA verification steps tldr):
  • (run these in terminal):
  • export PATH=/Developer/NVIDIA/CUDA-7.0/bin:$PATH
  1. check that this gives some sort of output and that driver works

kextstat | grep -i cuda

  1. now test compiler, does this give output?:

nvcc -V

  1. now test complier by building some samples:

cd /Developer/NVIDIA/CUDA-7.0/samples

  1. now run these _individually_ and check that there are no errors. I used sudo for each...

make -C 0_Simple/vectorAdd make -C 0_Simple/vectorAddDrv make -C 1_Utilities/deviceQuery make -C 1_Utilities/bandwidthTest

  • now we check runtime.

cd bin/x86_64/darwin/release ./deviceQuery

  • check output matches Figure 1 in 'verification steps' link above


  • check output matches Figure 2 in 'verification steps' link above

(numbering is broken - next number should be 6, not 1):