All Versions
4
Latest Version
Avg Release Cycle
42 days
Latest Release
1306 days ago

Changelog History

  • v0.8.1

    August 08, 2017

    ๐Ÿš€ This incremental release provides support for cuDNN7.

  • v0.8.0

    July 21, 2017

    ๐Ÿš€ Caffe2 v0.8.0 Release Notes
    July 21, 2017

    Major Changes

    ๐Ÿณ Docker

    ๐Ÿณ docker pull caffe2ai/caffe2

  • v0.7.0

    April 18, 2017

    ๐Ÿš€ Caffe2 v0.7.0 Release Notes

    Installation

    ๐Ÿ— This build is confirmed for:

    • Ubuntu 14.04
    • Ubuntu 16.06

    Required Dependencies

    sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ libgoogle-glog-dev \ libprotobuf-dev \ protobuf-compiler \ python-dev \ python-pip sudo pip install numpy protobuf
    

    ๐Ÿ‘ Optional GPU Support

    If you plan to use GPU instead of CPU only, then you should install NVIDIA CUDA and cuDNN, a GPU-accelerated library of primitives for deep neural networks.
    ๐Ÿง NVIDIA's detailed instructions or if you're feeling lucky try the quick install set of commands below.

    โšก๏ธ Update your graphics card drivers first! Otherwise you may suffer from a wide range of difficult to diagnose errors.

    For Ubuntu 14.04

    sudo apt-get update && sudo apt-get install wget -y --no-install-recommends wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86\_64/cuda-repo-ubuntu1404\_8.0.61-1\_amd64.deb"sudo dpkg -i cuda-repo-ubuntu1404\_8.0.61-1\_amd64.deb sudo apt-get update sudo apt-get install cuda
    

    For Ubuntu 16.04

    sudo apt-get update && sudo apt-get install wget -y --no-install-recommends wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86\_64/cuda-repo-ubuntu1604\_8.0.61-1\_amd64.deb"sudo dpkg -i cuda-repo-ubuntu1604\_8.0.61-1\_amd64.deb sudo apt-get update sudo apt-get install cuda
    

    Install cuDNN (all Ubuntu versions)

    CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
    wget ${CUDNN_URL}
    sudo tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local
    rm cudnn-8.0-linux-x64-v5.1.tgz && sudo ldconfig
    

    Optional Dependencies

    Note libgflags2 is for Ubuntu 14.04. libgflags-dev is for Ubuntu 16.04.

    # for Ubuntu 14.04sudo apt-get install -y --no-install-recommends libgflags2
    
    # for Ubuntu 16.04sudo apt-get install -y --no-install-recommends libgflags-dev
    
    # for both Ubuntu 14.04 and 16.04sudo apt-get install -y --no-install-recommends \ libgtest-dev \ libiomp-dev \ libleveldb-dev \ liblmdb-dev \ libopencv-dev \ libopenmpi-dev \ libsnappy-dev \ openmpi-bin \ openmpi-doc \ python-pydot sudo pip install \ flask \ graphviz \ hypothesis \ jupyter \ matplotlib \ pydot python-nvd3 \ pyyaml \ requests \ scikit-image \ scipy \ setuptools \ tornado
    

    ๐Ÿ— Clone & Build

    git clone --recursive https://github.com/caffe2/caffe2.git && cd caffe2 make && cd build && sudo make install python -c 'from caffe2.python import core' 2\>/dev/null && echo "Success" || echo "Failure"
    

    ๐Ÿ— Run this command below to test if your GPU build was a success. You will get a test output either way, but it will warn you at the top of the output if CPU was used instead along with other errors like missing libraries.

    python -m caffe2.python.operator\_test.relu\_op\_test
    

    Environment Variables

    ๐Ÿ— These environment variables may assist you depending on your current configuration. When using the install instructions above on the AWS Deep Learning AMI you don't need to set these variables. However, our Docker scripts built on Ubuntu-14.04 or NVIDIA's CUDA images seem to benefit from having these set. If you ran into problems with the build tests above then these are good things to check. Echo them first and see what you have and possibly append or replace with these directories. Also visit the troubleshooting section below.

    echo $PYTHONPATH# export PYTHONPATH=/usr/local:$PYTHONPATH# export PYTHONPATH=$PYTHONPATH:/home/ubuntu/caffe2/buildecho $LD\_LIBRARY\_PATH# export LD\_LIBRARY\_PATH=/usr/local/lib:$LD\_LIBRARY\_PATH
    

    Setting Up Tutorials & Jupyter Server

    ๐Ÿ‘€ If you're running this all on a cloud computer, you probably won't have a UI or way to view the IPython notebooks by default. Typically, you would launch them locally with ipython notebook and you would see a localhost:8888 webpage pop up with the directory of notebooks running. The following example will show you how to launch the Jupyter server and connect to remotely via an SSH tunnel.

    ๐Ÿ”’ First configure your cloud server to accept port 8889, or whatever you want, but change the port in the following commands. On AWS you accomplish this by adding a rule to your server's security group allowing a TCP inbound on port 8889. Otherwise you would adjust iptables for this.

    Next you launch the Juypter server.

    jupyter notebook --no-browser --port=8889
    

    Then create the SSH tunnel. This will pass the cloud server's Jupyter instance to your localhost 8888 port for you to use locally. The example below is templated after how you would connect AWS, where your-public-cert.pem is your own public certificate and [email protected] is your login to your cloud server. You can easily grab this on AWS by going to Instances > Connect and copy the part after ssh and swap that out in the command below.

    ssh -N -f -L localhost:8888:localhost:8889 -i "your-public-cert.pem" [email protected]
    

    Troubleshooting

    Python errors
    0๏ธโƒฃ Python version
    ๐Ÿ“ฆ Solution
    ๐Ÿ‘ Python environment
    ๐Ÿ“ฆ Solution
    pip version If you plan to use Python with Caffe2 then you need pip.
    Solution sudo apt-get install python-pip and also try using pip2 instead of pip.
    "AttributeError: 'module' object has no attribute 'MakeArgument'" Occurs when calling core.CreateOperator
    ๐Ÿšš Solution

    ๐Ÿ— | Building from source | | | --- | --- | | OS version | Caffe2 requires Ubuntu 14.04 or greater. | | git | While you can download the Caffe2 source code and submodules directly from GitHub as a zip, using git makes it much easier. | | Solution | sudo apt-get install git | | protobuf | You may experience an error related to protobuf during the make step. | | Solution | Make sure you've installed protobuf in both of these two ways: sudo apt-get install libprotobuf-dev protobuf-compiler && sudo pip install protobuf | | libgflags2 error | This optional dependency is for Ubuntu 14.04. | | Solution | Use apt-get install libgflags-dev for Ubuntu 16.04. |

    ๐Ÿ‘ | GPU Support | | | --- | --- | ๐Ÿ‘ | GPU errors | Unsupported GPU or wrong version | ๐Ÿง | Solution | You need to know the specific deb for your version of Linux. `sudo dpkg -i | ๐Ÿ— | Build issues | Be warned that installing CUDA and cuDNN will increase the size of your build by about 4GB, so plan to have at least 12GB for your Ubuntu disk size. |

  • v0.6.0

    April 03, 2017

    ๐Ÿš€ Caffe2 v0.6.0 Release Notes

    Installation

    ๐Ÿš€ Note: the release archive will not include third_party submodules which you will need in order to build Caffe2. We've uploaded an archive with the source and the submodules and attached it to this release. See the bottom of this page for the link!

    ๐Ÿ— This build is confirmed for:

    • Ubuntu 14.04
    • Ubuntu 16.06

    Required Dependencies

    sudo apt-get update sudo apt-get install python-dev python-pip git build-essential cmake libprotobuf-dev protobuf-compiler libgoogle-glog-dev sudo pip install numpy protobuf
    

    ๐Ÿ‘ Optional GPU Support

    If you plan to use GPU instead of CPU only, then you should install NVIDIA CUDA and cuDNN, a GPU-accelerated library of primitives for deep neural networks.
    ๐Ÿง NVIDIA's detailed instructions or if you're feeling lucky try the quick install set of commands below.

    โšก๏ธ Update your graphics card drivers first! Otherwise you may suffer from a wide range of difficult to diagnose errors.

    For Ubuntu 14.04

    sudo apt-get update && sudo apt-get install wget -y --no-install-recommends wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86\_64/cuda-repo-ubuntu1404\_8.0.61-1\_amd64.deb"sudo dpkg -i cuda-repo-ubuntu1404\_8.0.61-1\_amd64.deb sudo apt-get update sudo apt-get install cuda
    

    For Ubuntu 16.04

    sudo apt-get update && sudo apt-get install wget -y --no-install-recommends wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86\_64/cuda-repo-ubuntu1604\_8.0.61-1\_amd64.deb"sudo dpkg -i cuda-repo-ubuntu1604\_8.0.61-1\_amd64.deb sudo apt-get update sudo apt-get install cuda
    

    Install cuDNN (all Ubuntu versions)

    CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
    wget ${CUDNN_URL}
    sudo tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local
    rm cudnn-8.0-linux-x64-v5.1.tgz && sudo ldconfig
    

    Optional Dependencies

    sudo apt-get install libgtest-dev libgflags2 libgflags-dev liblmdb-dev libleveldb-dev libsnappy-dev libopencv-dev libiomp-dev openmpi-bin openmpi-doc libopenmpi-dev python-pydot sudo pip install flask graphviz hypothesis jupyter matplotlib pydot python-nvd3 pyyaml requests scikit-image scipy setuptools tornado
    
    • Note for Ubuntu 16.04 libgflags2 should be replaced with libgflags-dev.

    ๐Ÿ— Clone & Build

    git clone --recursive https://github.com/caffe2/caffe2.git && cd caffe2 make && cd build && sudo make install python -c 'from caffe2.python import core' 2\>/dev/null && echo "Success" || echo "Failure"
    

    ๐Ÿ— Run this command below to test if your GPU build was a success. You will get a test output either way, but it will warn you at the top of the output if CPU was used instead along with other errors like missing libraries.

    python -m caffe2.python.operator\_test.relu\_op\_test
    

    Environment Variables

    ๐Ÿ— These environment variables may assist you depending on your current configuration. When using the install instructions above on the AWS Deep Learning AMI you don't need to set these variables. However, our Docker scripts built on Ubuntu-14.04 or NVIDIA's CUDA images seem to benefit from having these set. If you ran into problems with the build tests above then these are good things to check. Echo them first and see what you have and possibly append or replace with these directories. Also visit the troubleshooting section below.

    echo $PYTHONPATH# export PYTHONPATH=/usr/local:$PYTHONPATH# export PYTHONPATH=$PYTHONPATH:/home/ubuntu/caffe2/buildecho $LD\_LIBRARY\_PATH# export LD\_LIBRARY\_PATH=/usr/local/lib:$LD\_LIBRARY\_PATH
    

    Setting Up Tutorials & Jupyter Server

    ๐Ÿ‘€ If you're running this all on a cloud computer, you probably won't have a UI or way to view the IPython notebooks by default. Typically, you would launch them locally with ipython notebook and you would see a localhost:8888 webpage pop up with the directory of notebooks running. The following example will show you how to launch the Jupyter server and connect to remotely via an SSH tunnel.

    ๐Ÿ”’ First configure your cloud server to accept port 8889, or whatever you want, but change the port in the following commands. On AWS you accomplish this by adding a rule to your server's security group allowing a TCP inbound on port 8889. Otherwise you would adjust iptables for this.

    Next you launch the Juypter server.

    jupyter notebook --no-browser --port=8889
    

    Then create the SSH tunnel. This will pass the cloud server's Jupyter instance to your localhost 8888 port for you to use locally. The example below is templated after how you would connect AWS, where your-public-cert.pem is your own public certificate and [email protected] is your login to your cloud server. You can easily grab this on AWS by going to Instances > Connect and copy the part after ssh and swap that out in the command below.

    ssh -N -f -L localhost:8888:localhost:8889 -i "your-public-cert.pem" [email protected]
    

    Troubleshooting

    Python errors
    0๏ธโƒฃ Python version
    ๐Ÿ“ฆ Solution
    ๐Ÿ‘ Python environment
    ๐Ÿ“ฆ Solution
    pip version If you plan to use Python with Caffe2 then you need pip.
    Solution sudo apt-get install python-pip and also try using pip2 instead of pip.

    ๐Ÿ— | Building from source | | | --- | --- | | OS version | Caffe2 requires Ubuntu 14.04 or greater. | | git | While you can download the Caffe2 source code and submodules directly from GitHub as a zip, using git makes it much easier. | | Solution | sudo apt-get install git | | protobuf | You may experience an error related to protobuf during the make step. | | Solution | Make sure you've installed protobuf in both of these two ways: sudo apt-get install libprotobuf-dev protobuf-compiler && sudo pip install protobuf | | libgflags2 error | This optional dependency is for Ubuntu 14.04. | | Solution | Use apt-get install libgflags-dev for Ubuntu 16.04. |

    ๐Ÿ‘ | GPU Support | | | --- | --- | ๐Ÿ‘ | GPU errors | Unsupported GPU or wrong version | ๐Ÿง | Solution | You need to know the specific deb for your version of Linux. `sudo dpkg -i | ๐Ÿ— | Build issues | Be warned that installing CUDA and cuDNN will increase the size of your build by about 4GB, so plan to have at least 12GB for your Ubuntu disk size. |