From 4ca451cf77092c913e0c98d6cb41e8185e386b32 Mon Sep 17 00:00:00 2001 From: OneCodeMonkey <1460018362@qq.com> Date: Tue, 23 Jul 2019 19:17:33 +0800 Subject: [PATCH 1/2] fix bug: Tornado requires an up-to-date SSL module. This means Python 2.7.9+ or 3.4+ (although some distributions have backported the necessary changes to older versions). --- Dockerfile.cpu | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Dockerfile.cpu b/Dockerfile.cpu index 506b734..3237120 100644 --- a/Dockerfile.cpu +++ b/Dockerfile.cpu @@ -10,6 +10,31 @@ 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" + +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 some dependencies RUN apt-get update && apt-get install -y \ bc \ From c8d40618d47ac7f2923cd778aa33b6af1a2c642c Mon Sep 17 00:00:00 2001 From: OneCodeMonkey <1460018362@qq.com> Date: Tue, 23 Jul 2019 21:24:22 +0800 Subject: [PATCH 2/2] fix --- Dockerfile.cpu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.cpu b/Dockerfile.cpu index 3237120..44f9a2e 100644 --- a/Dockerfile.cpu +++ b/Dockerfile.cpu @@ -101,7 +101,7 @@ RUN apt-get update && apt-get install -y \ doxygen \ && \ apt-get clean && \ - apt-get autoremove && \ + apt-get -y autoremove && \ rm -rf /var/lib/apt/lists/* && \ # 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 @@ -131,10 +131,11 @@ RUN apt-get update && apt-get install -y \ python-sympy \ && \ apt-get clean && \ - apt-get autoremove && \ + apt-get -y autoremove && \ rm -rf /var/lib/apt/lists/* # Install other useful Python packages using pip +RUN apt-get -y remove ipython RUN pip --no-cache-dir install --upgrade ipython && \ pip --no-cache-dir install \ Cython \ @@ -170,7 +171,7 @@ RUN apt-get update && apt-get install -y \ protobuf-compiler \ && \ apt-get clean && \ - apt-get autoremove && \ + apt-get -y autoremove && \ rm -rf /var/lib/apt/lists/* # Install Caffe