Skip to content

Commit bb917aa

Browse files
committed
chore: adding wget
1 parent d165174 commit bb917aa

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

‎build-dockerfiles.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ for python_version in "3.7" "3.8" "3.9-rc"; do
5050
if [ "$type" == "gpu" ]; then
5151
echo "" >>"${output_file}"
5252
echo "# Adding Nvidia ML repo" >>"${output_file}"
53+
5354
echo 'RUN echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list' >>"${output_file}"
54-
echo 'RUN wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | sudo apt-key add -' >>"${output_file}"
55+
apt_install_temp_packages ${output_file} "wget"
56+
echo '&& wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - \' >>"${output_file}"
57+
apt_clean_temp_packages ${output_file}
58+
echo "" >>"${output_file}"
5559

5660
echo "" >>"${output_file}"
5761
echo "Adding CUDNN"

‎dockerfiles/3.7/gpu/Dockerfile‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,17 @@ RUN set -ex; \
191191

192192
# Adding Nvidia ML repo
193193
RUN echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
194-
RUN wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | sudo apt-key add -
194+
RUN savedAptMark="$(apt-mark showmanual)" \
195+
&& apt update \
196+
&& apt install wget -y --no-install-recommends \
197+
&& wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - \
198+
&& apt-mark auto '.*' > /dev/null \
199+
&& apt-mark manual $savedAptMark \
200+
&& apt purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
201+
&& apt autoclean \
202+
&& apt clean \
203+
&& rm -rf /var/lib/apt/lists/*
204+
195205

196206
# Adding CUDNN
197207
ENV CUDNN_VERSION 8.0.2.39

‎dockerfiles/3.8/gpu/Dockerfile‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,17 @@ RUN set -ex; \
155155

156156
# Adding Nvidia ML repo
157157
RUN echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
158-
RUN wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | sudo apt-key add -
158+
RUN savedAptMark="$(apt-mark showmanual)" \
159+
&& apt update \
160+
&& apt install wget -y --no-install-recommends \
161+
&& wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - \
162+
&& apt-mark auto '.*' > /dev/null \
163+
&& apt-mark manual $savedAptMark \
164+
&& apt purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
165+
&& apt autoclean \
166+
&& apt clean \
167+
&& rm -rf /var/lib/apt/lists/*
168+
159169

160170
# Adding CUDNN
161171
ENV CUDNN_VERSION 8.0.2.39

‎dockerfiles/3.9-rc/gpu/Dockerfile‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ RUN set -ex; \
154154

155155
# Adding Nvidia ML repo
156156
RUN echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
157-
RUN wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | sudo apt-key add -
157+
RUN savedAptMark="$(apt-mark showmanual)" \
158+
&& apt update \
159+
&& apt install wget -y --no-install-recommends \
160+
&& wget -qO - https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - \
161+
&& apt-mark auto '.*' > /dev/null \
162+
&& apt-mark manual $savedAptMark \
163+
&& apt purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
164+
&& apt autoclean \
165+
&& apt clean \
166+
&& rm -rf /var/lib/apt/lists/*
167+
158168

159169
# Adding CUDNN
160170
ENV CUDNN_VERSION 8.0.2.39

0 commit comments

Comments
 (0)