Public Repository

Last pushed: 2 years ago
Short Description
tensorflow
Full Description

Start with cuda7.0 base image

FROM kaixhin/cuda:7.0
MAINTAINER Dong-Hyun Kwak dhkwak@bi.snu.ac.kr

Install [cudnn 6.5]

RUN wget --quiet https://www.dropbox.com/s/pqb55toxjqop506/cudnn-6.5-linux-x64-v2.tar && \
tar -xvf cudnn-6.5-linux-x64-v2.tar && \
rm cudnn-6.5-linux-x64-v2.tar && \
ldconfig

COPY cudnn-6.5-linux-x64-v2/cudnn.h usr/local/cuda/include/
COPY cudnn-6.5-linux-x64-v2/libcudnn.so* usr/local/cuda/lib64/

install [tensorflow] # this is from google

RUN apt-get update && apt-get install -y \
git \
curl \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
python-numpy \
python-pip \
python-scipy \
&& \
apt-get clean

#rm -rf /var/lib/apt/lists/*

RUN curl -fSsL -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py

#RUN pip --no-cache-dir install \

    #ipykernel \
    #jupyter \
    #matplotlib \
    #&& \
#python -m ipykernel.kernelspec

Update pip

RUN pip install --upgrade pip

Install matplotlib

RUN apt-get install -y python-matplotlib

#RUN pip install matplotlib

Install TensorFlow GPU version.

ENV TENSORFLOW_VERSION 0.6.0
RUN pip --no-cache-dir install \
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-${TENSORFLOW_VERSION}-cp27-none-linux_x86_64.whl

Set up CUDA variables

ENV CUDA_PATH /usr/local/cuda
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64

Set up our notebook config.

#COPY jupyter_notebook_config.py /root/.jupyter/

Jupyter has issues with being run directly:

https://github.com/ipython/ipython/issues/7062

We just add a little wrapper script.

#COPY run_jupyter.sh /

TensorBoard

EXPOSE 6006

IPython

EXPOSE 8888

WORKDIR "/root"

CMD ["/bin/bash"]

Install [H5py] # This is not an official installation but this works well.

RUN apt-get install -y python-h5py

Install [Requests]

RUN pip install --upgrade Request

Install [Ipython 3.2.1]

RUN pip install "ipython[notebook]==3.2.1"

Install [mpld3]

RUN pip install mpld3

Install [Scikit-learn]

#RUN pip install -U scikit-learn
RUN apt-get install -y \
python python-pip \
python-numpy python-scipy \
build-essential python-dev python-setuptools \
libatlas-dev libatlas3gf-base

RUN update-alternatives --set libblas.so.3 \
/usr/lib/atlas-base/atlas/libblas.so.3; \
update-alternatives --set liblapack.so.3 \
/usr/lib/atlas-base/atlas/liblapack.so.3

RUN pip install -U scikit-learn

Install [bleeding-edge JSAnimation]

WORKDIR $HOME
RUN git clone https://github.com/jakevdp/JSAnimation.git
RUN python JSAnimation/setup.py install
ENV PYTHONPATH $PYTHONPATH:$HOME/JSAnimation/:

#RUN pip install --upgrade https://github.com/jakevdp/JSAnimation/archive/master.zip

Install [vim, screen]

RUN apt-get install -y vim screen

screen option

RUN printf "export PATH=/usr/local/cuda/bin:$PATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> /root/.bashrc
RUN printf "shell -/bin/bash" >> /root/.screenrc

IPython nbserver

RUN ipython profile create nbserver
RUN cd /root && wget --quiet https://www.dropbox.com/s/squwoa2lc7yzd9v/setup_nbserver.py?dl=0 -O setup_nbserver.py

Docker Pull Command
Owner
imcomking