Skip to content

Instantly share code, notes, and snippets.

@mogumogu2333
Forked from sushant-hiray/install-serving.md
Created November 1, 2016 22:44
Show Gist options
  • Select an option

  • Save mogumogu2333/b65625861f9366cf63bd516b2c96b73b to your computer and use it in GitHub Desktop.

Select an option

Save mogumogu2333/b65625861f9366cf63bd516b2c96b73b to your computer and use it in GitHub Desktop.

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

sudo pip install mock

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 -c opt tensorflow_serving/...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment