Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (47 sloc) 1.65 KB
FROM ubuntu:16.04
LABEL description="This dockerfile builds and setup ready-to-launch tensorflow_serving server" github_repo="https://github.com/jagpreetschawla/useful_docker_files"
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
mlocate \
pkg-config \
python-dev \
python-numpy \
python-pip \
software-properties-common \
swig \
zip \
zlib1g-dev \
libcurl3-dev \
openjdk-8-jdk\
openjdk-8-jre-headless \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set up grpc
RUN pip install mock grpcio
# Set up Bazel.
ENV BAZELRC /root/.bazelrc
# Install the most recent bazel release.
ENV BAZEL_VERSION 0.5.4
WORKDIR /
RUN mkdir /bazel && \
cd /bazel && \
curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
curl -fSsL -o /bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE && \
chmod +x bazel-*.sh && \
./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
cd / && \
rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
# clone serving v1.6.0
RUN git clone --branch 1.6.0 https://github.com/tensorflow/serving.git
RUN cd serving && bazel build -c opt tensorflow_serving/...
EXPOSE 9000/tcp
VOLUME /model
# CMD ["/bin/bash"]
ENTRYPOINT ["serving/bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server", "--enable_batching", "--port=9000", "--model_base_path=/model"]
You can’t perform that action at this time.