LoginSignup
0

More than 3 years have passed since last update.

posted at

updated at

Ubuntu16.04にCaffe2をインストールする

はじめに

この記事では、ubuntu16.04にディープラーニングフレームワーク「Caffe2」をインストールする手順を記載します。

環境

・Ubuntu16.04(Windows10上のVirtualBoxにインストール)
・Python2.7
・CPU Only

インストール手順

※Ubuntu16.04はインストール直後の状態です。
※権限が足りない場合は適宜付与してください。

1.事前に必要ないくつかのパッケージをインストール
$ sudo apt-get update
$ sudo apt-get install -y --no-install-recommends \
       build-essential \
       git \
       libgoogle-glog-dev \
       libgtest-dev \
       libiomp-dev \
       libleveldb-dev \
       liblmdb-dev \
       libopencv-dev \
       libopenmpi-dev \
       libsnappy-dev \
       libprotobuf-dev \
       openmpi-bin \
       openmpi-doc \
       protobuf-compiler \
       python-dev \
       python-pip
$ pip install --upgrade pip
$ sudo apt-get install python-setuptools
$ pip install --user \
       future \
       numpy \
       protobuf \
       typing \
       hypothesis
$ sudo apt-get install -y --no-install-recommends \
       libgflags-dev \
       cmake
$ sudo apt-get install -y --no-install-recommends \
       libgflags-dev \
       cmake
2.Pytorch(Caffe2)本体をインストール&ビルド(私の環境だと1時間がかかった)
$ git clone https://github.com/pytorch/pytorch.git && cd pytorch
$ git submodule update --init --recursive
$ sudo apt-get install python-yaml
$ python setup.py install
3.Caffe2のインストール確認
$ cd ~ && python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
Success

リンク

AIエンジニアを目指してみる
Ubuntu16.04にCaffeをインストールする

参考

Caffe2公式

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0