From 9fa18dfef3ffa290283517fe97f43105c44e1f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 8 Mar 2019 23:42:23 +0400 Subject: [PATCH] :sparkles: Base images on buildpack-deps (or equivalent) --- cuda9.1-python3.6-tensorflow/Dockerfile | 2 +- cuda9.1-python3.6/Dockerfile | 96 +++++++++++++++++++++++++ cuda9.1-python3.7/Dockerfile | 96 +++++++++++++++++++++++++ python3.6-tensorflow/Dockerfile | 2 +- python3.6/Dockerfile | 2 +- python3.7/Dockerfile | 2 +- 6 files changed, 196 insertions(+), 4 deletions(-) diff --git a/cuda9.1-python3.6-tensorflow/Dockerfile b/cuda9.1-python3.6-tensorflow/Dockerfile index a3d2ea6..6728bca 100644 --- a/cuda9.1-python3.6-tensorflow/Dockerfile +++ b/cuda9.1-python3.6-tensorflow/Dockerfile @@ -1,4 +1,4 @@ -FROM tiangolo/python-machine-learning:conda-cuda9.1-python3.6 +FROM tiangolo/python-machine-learning:cuda9.1-python3.6 LABEL maintainer="Sebastian Ramirez " diff --git a/cuda9.1-python3.6/Dockerfile b/cuda9.1-python3.6/Dockerfile index 22499c4..24bfeba 100644 --- a/cuda9.1-python3.6/Dockerfile +++ b/cuda9.1-python3.6/Dockerfile @@ -2,6 +2,102 @@ FROM nvidia/cuda:9.1-base LABEL maintainer="Sebastian Ramirez " +# Install buildpack-deps:latest with its base image parts, as it is the base for official Python + +# buildpack-deps:curl https://github.com/docker-library/buildpack-deps/blob/master/stretch/curl/Dockerfile +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + netbase \ + wget \ + && rm -rf /var/lib/apt/lists/* + +RUN set -ex; \ + if ! command -v gpg > /dev/null; then \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + dirmngr \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + fi +# End buildpack-deps:curl + +# buildpack-deps:scm https://github.com/docker-library/buildpack-deps/blob/master/stretch/scm/Dockerfile + +# procps is very common in build systems, and is a reasonably small package +RUN apt-get update && apt-get install -y --no-install-recommends \ + bzr \ + git \ + mercurial \ + openssh-client \ + subversion \ + \ + procps \ + && rm -rf /var/lib/apt/lists/* + +# End buildpack-deps:scm + +# buildpack-deps:latest https://github.com/docker-library/buildpack-deps/blob/master/stretch/Dockerfile + +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + autoconf \ + automake \ + bzip2 \ + dpkg-dev \ + file \ + g++ \ + gcc \ + imagemagick \ + libbz2-dev \ + libc6-dev \ + libcurl4-openssl-dev \ + libdb-dev \ + libevent-dev \ + libffi-dev \ + libgdbm-dev \ + libgeoip-dev \ + libglib2.0-dev \ + libgmp-dev \ + libjpeg-dev \ + libkrb5-dev \ + liblzma-dev \ + libmagickcore-dev \ + libmagickwand-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libpng-dev \ + libpq-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + libtool \ + libwebp-dev \ + libxml2-dev \ + libxslt-dev \ + libyaml-dev \ + make \ + patch \ + unzip \ + xz-utils \ + zlib1g-dev \ + \ +# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html + $( \ +# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep + if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \ + echo 'default-libmysqlclient-dev'; \ + else \ + echo 'libmysqlclient-dev'; \ + fi \ + ) \ + ; \ + rm -rf /var/lib/apt/lists/* + +# End buildpack-deps:latest + ENV PYTHON_VERSION=3.6 # Conda, fragments from: https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/Dockerfile diff --git a/cuda9.1-python3.7/Dockerfile b/cuda9.1-python3.7/Dockerfile index 4964b9d..82e03d7 100644 --- a/cuda9.1-python3.7/Dockerfile +++ b/cuda9.1-python3.7/Dockerfile @@ -2,6 +2,102 @@ FROM nvidia/cuda:9.1-base LABEL maintainer="Sebastian Ramirez " +# Install buildpack-deps:latest with its base image parts, as it is the base for official Python + +# buildpack-deps:curl https://github.com/docker-library/buildpack-deps/blob/master/stretch/curl/Dockerfile +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + netbase \ + wget \ + && rm -rf /var/lib/apt/lists/* + +RUN set -ex; \ + if ! command -v gpg > /dev/null; then \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + dirmngr \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + fi +# End buildpack-deps:curl + +# buildpack-deps:scm https://github.com/docker-library/buildpack-deps/blob/master/stretch/scm/Dockerfile + +# procps is very common in build systems, and is a reasonably small package +RUN apt-get update && apt-get install -y --no-install-recommends \ + bzr \ + git \ + mercurial \ + openssh-client \ + subversion \ + \ + procps \ + && rm -rf /var/lib/apt/lists/* + +# End buildpack-deps:scm + +# buildpack-deps:latest https://github.com/docker-library/buildpack-deps/blob/master/stretch/Dockerfile + +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + autoconf \ + automake \ + bzip2 \ + dpkg-dev \ + file \ + g++ \ + gcc \ + imagemagick \ + libbz2-dev \ + libc6-dev \ + libcurl4-openssl-dev \ + libdb-dev \ + libevent-dev \ + libffi-dev \ + libgdbm-dev \ + libgeoip-dev \ + libglib2.0-dev \ + libgmp-dev \ + libjpeg-dev \ + libkrb5-dev \ + liblzma-dev \ + libmagickcore-dev \ + libmagickwand-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libpng-dev \ + libpq-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + libtool \ + libwebp-dev \ + libxml2-dev \ + libxslt-dev \ + libyaml-dev \ + make \ + patch \ + unzip \ + xz-utils \ + zlib1g-dev \ + \ +# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html + $( \ +# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep + if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \ + echo 'default-libmysqlclient-dev'; \ + else \ + echo 'libmysqlclient-dev'; \ + fi \ + ) \ + ; \ + rm -rf /var/lib/apt/lists/* + +# End buildpack-deps:latest + ENV PYTHON_VERSION=3.7 # Conda, fragments from: https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/Dockerfile diff --git a/python3.6-tensorflow/Dockerfile b/python3.6-tensorflow/Dockerfile index 5cdd8db..a267f21 100644 --- a/python3.6-tensorflow/Dockerfile +++ b/python3.6-tensorflow/Dockerfile @@ -1,4 +1,4 @@ -FROM tiangolo/python-machine-learning:conda-python3.6 +FROM tiangolo/python-machine-learning:python3.6 LABEL maintainer="Sebastian Ramirez " diff --git a/python3.6/Dockerfile b/python3.6/Dockerfile index 2d31957..62d6927 100644 --- a/python3.6/Dockerfile +++ b/python3.6/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stretch +FROM buildpack-deps:stretch LABEL maintainer="Sebastian Ramirez " diff --git a/python3.7/Dockerfile b/python3.7/Dockerfile index aa5f780..dfd52b8 100644 --- a/python3.7/Dockerfile +++ b/python3.7/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stretch +FROM buildpack-deps:stretch LABEL maintainer="Sebastian Ramirez "