<commit_before># Install Caffe

To use Caffe in DIGITS, you must use [NVIDIA's fork](https://github.com/NVIDIA/caffe), version [`0.11`](https://github.com/NVIDIA/caffe/tree/caffe-0.11) or greater.

To enable multi-GPU training, install version [`0.12`](https://github.com/NVIDIA/caffe/tree/caffe-0.12).

## Grab the source

    % cd $HOME
    % git clone --branch caffe-0.12 https://github.com/NVIDIA/caffe.git

Set an environment variable so DIGITS knows where Caffe is installed (optional):

    % export CAFFE_HOME=${HOME}/caffe

## Install dependencies

If you are not on Ubuntu 14.04, you can try [Caffe's installation page](http://caffe.berkeleyvision.org/installation.html). If you are, simply install these aptitude packages:

    % sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev
    % sudo apt-get install --no-install-recommends libboost-all-dev
    % sudo apt-get install python-dev python-pip gfortran

### Python dependencies

These packages need to be installed:

    % cd $CAFFE_HOME
    % cat python/requirements.txt
<commit_msg>Update InstallCaffe.md<commit_after># Install Caffe

To use Caffe in DIGITS, you must use [NVIDIA's fork](https://github.com/NVIDIA/caffe), version [`0.11`](https://github.com/NVIDIA/caffe/tree/caffe-0.11) or greater.

To enable multi-GPU training, install version [`0.12`](https://github.com/NVIDIA/caffe/tree/caffe-0.12).

## Grab the source

    % cd $HOME
    % git clone --branch caffe-0.12 https://github.com/NVIDIA/caffe.git

Set an environment variable so DIGITS knows where Caffe is installed (optional):

    % export CAFFE_HOME=${HOME}/caffe

## Install dependencies

If you are not on Ubuntu 14.04, you can try [Caffe's installation page](http://caffe.berkeleyvision.org/installation.html). If you are, simply install these aptitude packages:

    % sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev
    % sudo apt-get install --no-install-recommends libboost-all-dev
    % sudo apt-get install python-dev python-pip python-numpy gfortran

### Python dependencies

These packages need to be installed:

    % cd $CAFFE_HOME
    % cat python/requirements.txt

{'fraction_non_alphanumeric': 0.11438183347350715, 'fraction_numerical': 0.01682085786375105, 'mean_word_length': 4.008421052631579, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2716525', 'n_tokens_mistral': 818, 'n_tokens_neox': 771, 'n_words': 216}