Skip to content

Instantly share code, notes, and snippets.

@DjangoPeng
Last active October 31, 2017 07:40
Show Gist options
  • Save DjangoPeng/ce00add09714f247fe211c1dcff708aa to your computer and use it in GitHub Desktop.
Save DjangoPeng/ce00add09714f247fe211c1dcff708aa to your computer and use it in GitHub Desktop.
TensorFlow v1.0.1 Dockerfile
FROM ubuntu:14.04
MAINTAINER Peng Jingtian <pengjingtian@huawei.com>
# Set apt proxy
COPY apt.conf /etc/apt/apt.conf
# Set proxy
ARG proxy
ENV http_proxy $proxy
ENV https_proxy $proxy
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
python \
python-dev \
rsync \
software-properties-common \
unzip \
libtcmalloc-minimal4 \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
RUN pip --no-cache-dir install \
numpy \
scipy \
sklearn \
pandas \
Pillow \
keras \
grpcio \
h5py
# Install TensorFlow CPU version from tensorflow-release repo
COPY tensorflow-1.0.1-cp27-none-linux_x86_64.whl /tensorflow-1.0.1-cp27-none-linux_x86_64.whl
RUN pip --no-cache-dir install \
/tensorflow-1.0.1-cp27-none-linux_x86_64.whl
# Romove TensorFlow Whl
RUN rm /tensorflow-1.0.1-cp27-none-linux_x86_64.whl
# Copy Tensorflow serving deps
COPY tf_easy_save /tf_easy_save
RUN pip install /tf_easy_save
@DjangoPeng
Copy link
Author

DjangoPeng commented Apr 25, 2017

This is the key point to fix the free() bug:

apt-get install -y  libtcmalloc-minimal4

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