Skip to content

Instantly share code, notes, and snippets.

@sushant-hiray
Last active November 1, 2016 23:06
Show Gist options
  • Save sushant-hiray/f28770284b95d1421a93b2167de98288 to your computer and use it in GitHub Desktop.
Save sushant-hiray/f28770284b95d1421a93b2167de98288 to your computer and use it in GitHub Desktop.

Revisions

  1. sushant-hiray revised this gist Sep 1, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install-serving.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,8 @@ sudo yum install wget
    sudo yum install epel-release
    sudo yum install -y python-pip
    sudo pip install mock
    ```

    ### Installing Bazel
  2. sushant-hiray revised this gist Sep 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-serving.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ bazel build -c opt tensorflow_serving/...

    ### Testing Installation
    ```
    bazel test tensorflow_serving/...
    bazel test -c opt tensorflow_serving/...
    ```


  3. sushant-hiray created this gist Sep 1, 2016.
    66 changes: 66 additions & 0 deletions install-serving.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,66 @@
    ## Steps to install Tensorflow Serving on Centos 7

    ### Basic Prerequisites

    ```
    sudo yum install git
    sudo yum install gcc
    sudo yum install gcc-c++
    sudo yum install zip
    sudo yum install unzip
    sudo yum install wget
    sudo yum install epel-release
    sudo yum install -y python-pip
    ```

    ### Installing Bazel

    The instructions uses the release found at: https://github.com/bazelbuild/bazel/releases

    ```
    wget https://github.com/bazelbuild/bazel/releases/download/0.3.0/bazel-0.3.0-installer-linux-x86_64.sh
    chmod +x bazel-0.3.0-installer-linux-x86_64.sh
    ./bazel-0.3.0-installer-linux-x86_64.sh --user
    ```

    Set up your environment. Put this in your `~/.bashrc`
    eg: `export PATH="$PATH:/home/tensorflowserv/bin"`

    ### Dependencies for serving

    ```
    sudo pip install grpcio
    sudo yum install -y freetype-devel
    sudo yum install -y libpng12-devel
    sudo yum install -y zeromq-devel
    sudo yum install -y numpy scipy
    sudo yum install -y swig
    sudo yum install -y zlib-devel
    sudo yum install curl-devel
    ```

    ### Installing Serving via source

    ```
    git clone --recurse-submodules https://github.com/tensorflow/serving
    cd serving/tensorflow
    ./configure
    cd ..
    bazel build -c opt tensorflow_serving/...
    ```

    ### Testing Installation
    ```
    bazel test tensorflow_serving/...
    ```