Instructions for installing TensorFlow Serving on Ubuntu 14.04. I am following the instuctions from here.
Installation instructions can be found here
If you have a previous version of bazel, and you are trying to do a fresh install then you should remove your old version of bazel. If you installed it through apt, then you can do sudo apt-get purge bazel
. If you installed it from source, then you probably have a ~/bin
directory with the bazel command, which you should delete, and you probably have a ~/.bazel
directory that you should delete. Also check your ~/.bashrc
file for any links to ~/.bazel
.
- Install JDK 8
You'll need the
add-apt-repository
command, which you can get by doingsudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
- Add Bazel distribution URI as a package source
$ echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
$ curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
- Install and update Bazel
$ sudo apt-get update && sudo apt-get install bazel
- Future updates To upgrade bazel, just do:
$ sudo apt-get upgrade bazel
Installation instructions are here
# Activate your virtualenv if you are using one
$ pip install --upgrade grpcio
You probably have most of these dependencies. If you are using a virtualenv then you probably have the python packages too. You should modify this command for your current setup.
$ sudo apt-get update && sudo apt-get install -y \
build-essential \
curl \
libcurl3-dev \
git \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
python-dev \
python-numpy \
python-pip \
software-properties-common \
swig \
zip \
zlib1g-dev
For example, I used this command to see what I actually need:
$ sudo apt-get -s install -y \
build-essential \
curl \
libcurl3-dev \
git \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
software-properties-common \
swig \
zip \
zlib1g-dev
And then installed what I needed:
$ sudo apt-get install -y libcurl3-dev
$ git clone --recurse-submodules https://github.com/tensorflow/serving
$ cd serving
You'll need to provide different configuration settings depending on your environment. I find that the defaults usually work.
$ cd tensorflow
$ ./configure
$ cd ..
$ bazel build tensorflow_serving/...