Dockerfile 2.89 KB
Newer Older
Daniele Venzano's avatar
Daniele Venzano committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
FROM ubuntu:14.04

MAINTAINER Pietro Michiardi <Pietro.Michiardi@eurecom.fr>

ENV DEBIAN_FRONTEND noninteractive

##################################################
# BASELINE
##################################################
RUN apt-get update && apt-get install -y --force-yes --no-install-recommends \
    python-pip \
    python-dev \
    software-properties-common \
    curl \
    pkg-config \
    zip \
    g++ \
    zlib1g-dev \
    unzip \
    swig \
    git \
    swig \
    && apt-get clean

RUN python -m pip install --upgrade pip

##################################################
# JAVA
##################################################
RUN add-apt-repository ppa:webupd8team/java -y
RUN /bin/echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN apt-get update && apt-get install -y oracle-java8-installer

##################################################
# TENSORFLOW
##################################################
# From sources

# INSTALL BAZEL
RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -

RUN apt-get update && sudo apt-get install -y --force-yes --no-install-recommends bazel patch
RUN apt-get upgrade -y --force-yes --no-install-recommends bazel

# CLONE FROM GIT
RUN git clone https://github.com/tensorflow/tensorflow
WORKDIR /tensorflow

##################################################
# Make sure important packages are installed
##################################################
RUN pip install --upgrade numpy pandas matplotlib

# COMPILE AND INSTALL PIP PACKAGE
COPY files/conf.txt /tmp/conf.txt

RUN ./configure < /tmp/conf.txt 
RUN bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
RUN pip install wheel
RUN bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
RUN pip install /tmp/tensorflow_pkg/tensorflow-*.whl

##################################################
# GPy
##################################################
RUN pip install --upgrade GPy paramz

##################################################
# GPFlow
##################################################
WORKDIR /opt
RUN git clone https://github.com/GPflow/GPflow.git
WORKDIR /opt/GPflow
RUN python setup.py install

##################################################
# SETUP ZOE APP
##################################################
# Configure environment
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle/
ENV SHELL /bin/bash
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Configure container startup as root
EXPOSE 6006
WORKDIR /mnt/workspace
ENV WS_DIR /mnt/workspace
#COPY files/start-tf.sh /usr/local/bin/
#CMD ["/usr/local/bin/start-tf.sh"]
#RUN chmod 755 /usr/local/bin/start-tf.sh
#ADD files/* /usr/local/bin/
#RUN chmod +x /usr/local/bin/*
#ENTRYPOINT ["/usr/local/bin/start-tf.sh"]