From 69586e8c75047725971ad652ee161a9a13a2e060 Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Sat, 7 Mar 2020 00:57:04 +0530 Subject: [PATCH 1/2] Enhancement debian package manager tweaks Major Changes No 1 : debian package manager tweaks By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Major Changes No 2 : added packages apt-utils ca-certificates Because build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid build to exits with error without having certificate --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56afdbfc..7738d2e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,8 @@ FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 # Get basic packages RUN apt-get update && apt-get install -y --no-install-recommends \ + apt-utils \ + ca-certificates \ build-essential \ curl \ wget \ @@ -44,14 +46,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN ln -s -f /usr/bin/python3 /usr/bin/python # Install NCCL 2.2 -RUN apt-get install -qq -y --allow-downgrades --allow-change-held-packages libnccl2=2.3.7-1+cuda10.0 libnccl-dev=2.3.7-1+cuda10.0 +RUN apt-get --no-install-recommends install -qq -y --allow-downgrades --allow-change-held-packages libnccl2=2.3.7-1+cuda10.0 libnccl-dev=2.3.7-1+cuda10.0 # Install Bazel RUN curl -LO "https://github.com/bazelbuild/bazel/releases/download/0.24.1/bazel_0.24.1-linux-x86_64.deb" RUN dpkg -i bazel_*.deb # Install CUDA CLI Tools -RUN apt-get install -qq -y cuda-command-line-tools-10-0 +RUN apt-get --no-install-recommends install -qq -y cuda-command-line-tools-10-0 # Install pip RUN wget https://bootstrap.pypa.io/get-pip.py && \ From 00e3350ea1af34bd28d102926b65cb118b248e95 Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Sat, 7 Mar 2020 01:33:32 +0530 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7738d2e9..71fa0705 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,6 @@ FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 # Get basic packages RUN apt-get update && apt-get install -y --no-install-recommends \ apt-utils \ - ca-certificates \ build-essential \ curl \ wget \