anchor.diff:  ### END OF COPY ###
   ###################
   
  -# Install libgpuarray
   USER root
  -RUN cd $ADD_PKG_PATH && \
  -    git clone https://github.com/Theano/libgpuarray.git && \
  -    chown $NB_USER:$NB_USER libgpuarray && cd libgpuarray && \
  -    mkdir Build && cd Build && \
  -    cmake .. -DCMAKE_BUILD_TYPE=Release && \
  -    make && make install
  -
  -# Install Theano
  -USER $NB_USER
  -RUN conda install -yq pygpu theano
  -
  -# Set up .theanorc for CUDA
  -RUN echo "[global]\ndevice=cuda\nfloatX=float16\noptimizer_including=cudnn\nmode=FAST_RUN\n[nvcc]\nfastmath=True\n" >> /home/${NB_USER}/.theanorc
  -
  -# Install Keras
  -USER root
  -RUN apt-get update && apt-get install -y \
  -  libhdf5-dev \
  -  python-h5py \
  -  python-yaml
  +RUN conda install -y tensorflow-gpu keras-gpu && \
  +    conda clean -tipsy
   
   USER $NB_USER
  -RUN cd $ADD_PKG_PATH && \
  -    git clone https://github.com/fchollet/keras.git && \
  -    cd keras && \
  -    python setup.py install
  -
  -# Install tensorflow
  -USER root
  -RUN apt-get update && apt-get install -y python-dev python-pip libcupti-dev
  -
  -USER $NB_USER
  -# RUN pip install --upgrade tensorflow-gpu
  -ENV TF_BINARY_URL https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp35-cp35m-linux_x86_64.whl
  -RUN pip install --ignore-installed --upgrade $TF_BINARY_URL
  -# Reinstall numpy to fix mkl linkage
  -RUN conda install -f -y numpy
  
positive.code: FROM 20_add_packages:latest
  
  MAINTAINER LAM DANG
  
  LABEL com.nvidia.volumes.needed="nvidia_driver"
  
  # Install CUDA & CuDNN
  
  
negative.code: ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
  ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
  
  # Install CuDNN
  USER root
  
  