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.

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/...
@mogumogu2333
Copy link

Thank you! I'm appreciated your tutorial for tf serving on centos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment