The version of Caffe maintained by BVLC can be freely downloaded from https://github.com/BVLC/caffe. A GPU-optimized fork of Caffe maintained by NVIDIA can be downloaded from https://github.com/NVIDIA/caffe. For the remainder of this discussion, we will use BVLC Caffe, though NVIDIA Caffe should also build and work similarly.
Note that Caffe offers building using CMake or Make. We look at the CMake build process in this book. If you want Caffe to use the GPU, you will need to have CUDA and cuDNN libraries already installed.