manual_setup.rst 2.2 KB
Newer Older
1
Manual setup
L
update  
liutuo 已提交
2
=============
3

L
Liangliang He 已提交
4 5 6
The setup steps are based on ``Ubuntu``, you can change the commands
correspondingly for other systems.
For the detailed installation dependencies, please refer to :doc:`env_requirement`.
7 8

Install Bazel
L
Liangliang He 已提交
9
-------------
10 11 12 13 14 15 16 17 18 19 20 21 22 23

Recommend bazel with version larger than ``0.13.0`` (Refer to `Bazel documentation <https://docs.bazel.build/versions/master/install.html>`__).

.. code:: sh

    export BAZEL_VERSION=0.13.1
    mkdir /bazel && \
        cd /bazel && \
        wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
        chmod +x bazel-*.sh && \
        ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
        cd / && \
        rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh

L
Liangliang He 已提交
24 25
Install Android NDK
--------------------
26

L
Liangliang He 已提交
27 28
The recommended Android NDK versions includes r15b, r15c and r16b (Refers to
`NDK installation guide <https://developer.android.com/ndk/guides/setup#install>`__).
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

.. code:: sh

    # Download NDK r15c
    cd /opt/ && \
        wget -q https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip && \
        unzip -q android-ndk-r15c-linux-x86_64.zip && \
        rm -f android-ndk-r15c-linux-x86_64.zip

    export ANDROID_NDK_VERSION=r15c
    export ANDROID_NDK=/opt/android-ndk-${ANDROID_NDK_VERSION}
    export ANDROID_NDK_HOME=${ANDROID_NDK}

    # add to PATH
    export PATH=${PATH}:${ANDROID_NDK_HOME}

Install extra tools
L
Liangliang He 已提交
46
--------------------
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

.. code:: sh

    apt-get install -y --no-install-recommends \
        cmake \
        android-tools-adb
    pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com setuptools
    pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com \
        "numpy>=1.14.0" \
        scipy \
        jinja2 \
        pyyaml \
        sh==1.12.14 \
        pycodestyle==2.4.0 \
        filelock

L
Liangliang He 已提交
63
Install TensorFlow (Optional)
L
liutuo 已提交
64
------------------------------
65 66 67

.. code:: sh

L
liuqi 已提交
68
    pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com tensorflow==1.6.0
L
liutuo 已提交
69 70 71 72 73 74


Install Caffe (Optional)
-------------------------

Please follow the installation instruction of `Caffe <http://caffe.berkeleyvision.org/installation.html>`__.