diff --git a/Dockerfile.gpu b/Dockerfile.gpu index 3bad5a4..7e0b0d1 100644 --- a/Dockerfile.gpu +++ b/Dockerfile.gpu @@ -1,4 +1,4 @@ -FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04 +FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 MAINTAINER Sai Soundararaj @@ -10,6 +10,16 @@ ARG LASAGNE_VERSION=v0.1 ARG TORCH_VERSION=latest ARG CAFFE_VERSION=master +ARG PYTHON_BASEDEPS="build-essential python-pip" +ARG PYTHON_BUILDDEPS="libbz2-dev \ + libc6-dev \ + libgdbm-dev \ + libncursesw5-dev \ + libreadline-gplv2-dev \ + libsqlite3-dev \ + libssl-dev \ + tk-dev" + #RUN echo -e "\n**********************\nNVIDIA Driver Version\n**********************\n" && \ # cat /proc/driver/nvidia/version && \ # echo -e "\n**********************\nCUDA Version\n**********************\n" && \ @@ -87,6 +97,19 @@ RUN apt-get update && apt-get install -y \ # Link BLAS library to use OpenBLAS using the alternatives mechanism (https://www.scipy.org/scipylib/building/linux.html#debian-ubuntu) update-alternatives --set libblas.so.3 /usr/lib/openblas-base/libblas.so.3 +# Fix the SSL issue +ARG PYTHON_TARFILE="Python-2.7.9.tgz" +ARG PYTHON_TARHOST="https://www.python.org/ftp/python/2.7.9" +ARG PYTHON_SRCDIR="Python-2.7.9" +RUN apt-get update +RUN apt-get install -y ${PYTHON_BASEDEPS} ${PYTHON_BUILDDEPS} +RUN wget "${PYTHON_TARHOST}/${PYTHON_TARFILE}" +RUN tar xvf ${PYTHON_TARFILE} +RUN cd ${PYTHON_SRCDIR} && \ + ./configure && \ + make && \ + make install + # Install pip RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ python get-pip.py && \ @@ -106,15 +129,20 @@ RUN apt-get update && apt-get install -y \ python-nose \ python-h5py \ python-skimage \ - python-matplotlib \ python-pandas \ python-sklearn \ - python-sympy \ - && \ + python-sympy + +RUN apt-get update && apt-get install -y \ + libffi-dev libssl-dev && \ apt-get clean && \ apt-get autoremove && \ rm -rf /var/lib/apt/lists/* + +RUN pip install matplotlib \ + ipython + # Install other useful Python packages using pip RUN pip --no-cache-dir install --upgrade ipython && \ pip --no-cache-dir install \ @@ -155,7 +183,9 @@ RUN apt-get update && apt-get install -y \ rm -rf /var/lib/apt/lists/* # Install Caffe -RUN git clone -b ${CAFFE_VERSION} --depth 1 https://github.com/BVLC/caffe.git /root/caffe && \ +# Use video friendly Caffe instead. +# The original version: https://github.com/BVLC/caffe.git +RUN git clone -b ${CAFFE_VERSION} --depth 1 https://github.com/CXXT-Projects/video-caffe-patched.git /root/caffe && \ cd /root/caffe && \ cat python/requirements.txt | xargs -n1 pip install && \ mkdir build && cd build && \