Skip to content

Commit 80a184c

Browse files
committed
chore: updating for MKL DNN 1.4.0
1 parent c63a0b6 commit 80a184c

File tree

5 files changed

+55
-43
lines changed

5 files changed

+55
-43
lines changed

‎build-dockerfiles.sh‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ TENSORT_RT_6_PACKAGES="libnvinfer6=6.0.1-1+cuda10.1 libnvinfer-dev=6.0.1-1+cuda1
1515

1616
# Not sure on this : should gcc and g++ be included ?
1717
# Useful for lot's of python install packages, let's go for yes
18-
INSTALL_PACKAGES="gcc g++ libgomp1 libopenblas-dev libomp-dev"
18+
INSTALL_PACKAGES="gcc g++ libgomp1 libopenblas-dev libomp-dev graphviz"
1919

2020
# This are the temp package to install, when building packages or deps
2121
BUILD_PACKAGES="gcc g++ curl wget make cmake git gfortran"
2222

2323
# MKL-DNN (or OneDNN now) version to use
24-
ONE_DNN_VERSION="v0.21.5"
24+
ONE_DNN_VERSION="v1.4"
2525

2626
# From https://github.com/docker-library/python/
2727
# Here, we give link to raw content on github, on master
@@ -66,9 +66,13 @@ for python_version in "3.7" "3.8"; do
6666
echo "# Adding MKL-DNN (now OneDNN) to the image" >>"${output_file}"
6767
apt_install_temp_packages ${output_file} "${BUILD_PACKAGES}"
6868
echo "&& git clone https://github.com/01org/mkl-dnn.git -b ${ONE_DNN_VERSION} --depth 1 \\" >>"${output_file}"
69-
echo "&& cd mkl-dnn/scripts && ./prepare_mkl.sh && cd .. \\" >>"${output_file}"
70-
echo "&& mkdir -p build && cd build && cmake .. && make \\" >>"${output_file}"
71-
echo "&& make install \\" >>"${output_file}"
69+
echo "&& cd mkl-dnn && mkdir -p build && cd build \\">>"${output_file}"
70+
echo "&& cmake .. \\">>"${output_file}"
71+
echo "&& make -j \\">>"${output_file}"
72+
echo "&& make install \\">>"${output_file}"
73+
# echo "&& cd mkl-dnn/scripts && ./prepare_mkl.sh && cd .. \\" >>"${output_file}"
74+
# echo "&& mkdir -p build && cd build && cmake .. && make \\" >>"${output_file}"
75+
# echo "&& make install \\" >>"${output_file}"
7276
apt_clean_temp_packages ${output_file}
7377
echo "" >>"${output_file}"
7478
echo 'ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib' >>"${output_file}"

‎dockerfiles/3.7/cpu/Dockerfile‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT MODIFY MANUALLY
22
# GENERATED FROM SCRIPTS
3-
FROM ubuntu:18.04@sha256:b58746c8a89938b8c9f5b77de3b8cf1fe78210c696ab03a1442e235eea65d84f
3+
FROM ubuntu:18.04@sha256:3235326357dfb65f1781dbc4df3b834546d8bf914e82cce58e6e6b676e23ce8f
44

55
# Avoid tzdata interactive action
66
ENV DEBIAN_FRONTEND noninteractive
@@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND noninteractive
1010
# Dockerfile generated fragment to install Python and Pip
1111
# Source: https://raw.githubusercontent.com/docker-library/python/master/3.7/buster/slim/Dockerfile
1212
# Python: 3.7.7
13-
# Pip: 20.1
13+
# Pip: 20.1.1
1414

1515

1616

@@ -82,6 +82,7 @@ RUN set -ex \
8282
--with-system-ffi \
8383
--without-ensurepip \
8484
&& make -j "$(nproc)" \
85+
LDFLAGS="-Wl,--strip-all" \
8586
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
8687
PROFILE_TASK='-m test.regrtest --pgo \
8788
test_array \
@@ -151,10 +152,10 @@ RUN cd /usr/local/bin \
151152
&& ln -s python3-config python-config
152153

153154
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
154-
ENV PYTHON_PIP_VERSION 20.1
155+
ENV PYTHON_PIP_VERSION 20.1.1
155156
# https://github.com/pypa/get-pip
156-
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/1fe530e9e3d800be94e04f6428460fc4fb94f5a9/get-pip.py
157-
ENV PYTHON_GET_PIP_SHA256 ce486cddac44e99496a702aa5c06c5028414ef48fdfd5242cd2fe559b13d4348
157+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/get-pip.py
158+
ENV PYTHON_GET_PIP_SHA256 b3153ec0cf7b7bbf9556932aa37e4981c35dc2a2c501d70d91d2795aa532be79
158159

159160
RUN set -ex; \
160161
\
@@ -189,7 +190,7 @@ RUN set -ex; \
189190

190191
# Adding useful packages for the image
191192
RUN apt update \
192-
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev -y --no-install-recommends \
193+
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev graphviz -y --no-install-recommends \
193194
&& apt autoclean \
194195
&& apt clean \
195196
&& rm -rf /var/lib/apt/lists/*
@@ -198,9 +199,10 @@ RUN apt update \
198199
RUN savedAptMark="$(apt-mark showmanual)" \
199200
&& apt update \
200201
&& apt install gcc g++ curl wget make cmake git gfortran -y --no-install-recommends \
201-
&& git clone https://github.com/01org/mkl-dnn.git -b v0.21.5 --depth 1 \
202-
&& cd mkl-dnn/scripts && ./prepare_mkl.sh && cd .. \
203-
&& mkdir -p build && cd build && cmake .. && make \
202+
&& git clone https://github.com/01org/mkl-dnn.git -b v1.4 --depth 1 \
203+
&& cd mkl-dnn && mkdir -p build && cd build \
204+
&& cmake .. \
205+
&& make -j \
204206
&& make install \
205207
&& apt-mark auto '.*' > /dev/null \
206208
&& apt-mark manual $savedAptMark \

��dockerfiles/3.7/gpu/Dockerfile‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND noninteractive
1010
# Dockerfile generated fragment to install Python and Pip
1111
# Source: https://raw.githubusercontent.com/docker-library/python/master/3.7/buster/slim/Dockerfile
1212
# Python: 3.7.7
13-
# Pip: 20.1
13+
# Pip: 20.1.1
1414

1515

1616

@@ -82,6 +82,7 @@ RUN set -ex \
8282
--with-system-ffi \
8383
--without-ensurepip \
8484
&& make -j "$(nproc)" \
85+
LDFLAGS="-Wl,--strip-all" \
8586
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
8687
PROFILE_TASK='-m test.regrtest --pgo \
8788
test_array \
@@ -151,10 +152,10 @@ RUN cd /usr/local/bin \
151152
&& ln -s python3-config python-config
152153

153154
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
154-
ENV PYTHON_PIP_VERSION 20.1
155+
ENV PYTHON_PIP_VERSION 20.1.1
155156
# https://github.com/pypa/get-pip
156-
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/1fe530e9e3d800be94e04f6428460fc4fb94f5a9/get-pip.py
157-
ENV PYTHON_GET_PIP_SHA256 ce486cddac44e99496a702aa5c06c5028414ef48fdfd5242cd2fe559b13d4348
157+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/get-pip.py
158+
ENV PYTHON_GET_PIP_SHA256 b3153ec0cf7b7bbf9556932aa37e4981c35dc2a2c501d70d91d2795aa532be79
158159

159160
RUN set -ex; \
160161
\
@@ -196,7 +197,7 @@ RUN apt update \
196197

197198
# Adding useful packages for the image
198199
RUN apt update \
199-
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev -y --no-install-recommends \
200+
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev graphviz -y --no-install-recommends \
200201
&& apt autoclean \
201202
&& apt clean \
202203
&& rm -rf /var/lib/apt/lists/*
@@ -205,9 +206,10 @@ RUN apt update \
205206
RUN savedAptMark="$(apt-mark showmanual)" \
206207
&& apt update \
207208
&& apt install gcc g++ curl wget make cmake git gfortran -y --no-install-recommends \
208-
&& git clone https://github.com/01org/mkl-dnn.git -b v0.21.5 --depth 1 \
209-
&& cd mkl-dnn/scripts && ./prepare_mkl.sh && cd .. \
210-
&& mkdir -p build && cd build && cmake .. && make \
209+
&& git clone https://github.com/01org/mkl-dnn.git -b v1.4 --depth 1 \
210+
&& cd mkl-dnn && mkdir -p build && cd build \
211+
&& cmake .. \
212+
&& make -j \
211213
&& make install \
212214
&& apt-mark auto '.*' > /dev/null \
213215
&& apt-mark manual $savedAptMark \

‎dockerfiles/3.8/cpu/Dockerfile‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT MODIFY MANUALLY
22
# GENERATED FROM SCRIPTS
3-
FROM ubuntu:18.04@sha256:b58746c8a89938b8c9f5b77de3b8cf1fe78210c696ab03a1442e235eea65d84f
3+
FROM ubuntu:18.04@sha256:3235326357dfb65f1781dbc4df3b834546d8bf914e82cce58e6e6b676e23ce8f
44

55
# Avoid tzdata interactive action
66
ENV DEBIAN_FRONTEND noninteractive
@@ -9,8 +9,8 @@ ENV DEBIAN_FRONTEND noninteractive
99

1010
# Dockerfile generated fragment to install Python and Pip
1111
# Source: https://raw.githubusercontent.com/docker-library/python/master/3.8/buster/slim/Dockerfile
12-
# Python: 3.8.2
13-
# Pip: 20.1
12+
# Python: 3.8.3
13+
# Pip: 20.1.1
1414

1515

1616

@@ -29,7 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2929
&& rm -rf /var/lib/apt/lists/*
3030

3131
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
32-
ENV PYTHON_VERSION 3.8.2
32+
ENV PYTHON_VERSION 3.8.3
3333

3434
RUN set -ex \
3535
\
@@ -82,6 +82,7 @@ RUN set -ex \
8282
--with-system-ffi \
8383
--without-ensurepip \
8484
&& make -j "$(nproc)" \
85+
LDFLAGS="-Wl,--strip-all" \
8586
&& make install \
8687
&& ldconfig \
8788
\
@@ -115,10 +116,10 @@ RUN cd /usr/local/bin \
115116
&& ln -s python3-config python-config
116117

117118
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
118-
ENV PYTHON_PIP_VERSION 20.1
119+
ENV PYTHON_PIP_VERSION 20.1.1
119120
# https://github.com/pypa/get-pip
120-
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/1fe530e9e3d800be94e04f6428460fc4fb94f5a9/get-pip.py
121-
ENV PYTHON_GET_PIP_SHA256 ce486cddac44e99496a702aa5c06c5028414ef48fdfd5242cd2fe559b13d4348
121+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/get-pip.py
122+
ENV PYTHON_GET_PIP_SHA256 b3153ec0cf7b7bbf9556932aa37e4981c35dc2a2c501d70d91d2795aa532be79
122123

123124
RUN set -ex; \
124125
\
@@ -153,7 +154,7 @@ RUN set -ex; \
153154

154155
# Adding useful packages for the image
155156
RUN apt update \
156-
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev -y --no-install-recommends \
157+
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev graphviz -y --no-install-recommends \
157158
&& apt autoclean \
158159
&& apt clean \
159160
&& rm -rf /var/lib/apt/lists/*
@@ -162,9 +163,10 @@ RUN apt update \
162163
RUN savedAptMark="$(apt-mark showmanual)" \
163164
&& apt update \
164165
&& apt install gcc g++ curl wget make cmake git gfortran -y --no-install-recommends \
165-
&& git clone https://github.com/01org/mkl-dnn.git -b v0.21.5 --depth 1 \
166-
&& cd mkl-dnn/scripts && ./prepare_mkl.sh && cd .. \
167-
&& mkdir -p build && cd build && cmake .. && make \
166+
&& git clone https://github.com/01org/mkl-dnn.git -b v1.4 --depth 1 \
167+
&& cd mkl-dnn && mkdir -p build && cd build \
168+
&& cmake .. \
169+
&& make -j \
168170
&& make install \
169171
&& apt-mark auto '.*' > /dev/null \
170172
&& apt-mark manual $savedAptMark \

‎dockerfiles/3.8/gpu/Dockerfile‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ ENV DEBIAN_FRONTEND noninteractive
99

1010
# Dockerfile generated fragment to install Python and Pip
1111
# Source: https://raw.githubusercontent.com/docker-library/python/master/3.8/buster/slim/Dockerfile
12-
# Python: 3.8.2
13-
# Pip: 20.1
12+
# Python: 3.8.3
13+
# Pip: 20.1.1
1414

1515

1616

@@ -29,7 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2929
&& rm -rf /var/lib/apt/lists/*
3030

3131
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
32-
ENV PYTHON_VERSION 3.8.2
32+
ENV PYTHON_VERSION 3.8.3
3333

3434
RUN set -ex \
3535
\
@@ -82,6 +82,7 @@ RUN set -ex \
8282
--with-system-ffi \
8383
--without-ensurepip \
8484
&& make -j "$(nproc)" \
85+
LDFLAGS="-Wl,--strip-all" \
8586
&& make install \
8687
&& ldconfig \
8788
\
@@ -115,10 +116,10 @@ RUN cd /usr/local/bin \
115116
&& ln -s python3-config python-config
116117

117118
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
118-
ENV PYTHON_PIP_VERSION 20.1
119+
ENV PYTHON_PIP_VERSION 20.1.1
119120
# https://github.com/pypa/get-pip
120-
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/1fe530e9e3d800be94e04f6428460fc4fb94f5a9/get-pip.py
121-
ENV PYTHON_GET_PIP_SHA256 ce486cddac44e99496a702aa5c06c5028414ef48fdfd5242cd2fe559b13d4348
121+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/get-pip.py
122+
ENV PYTHON_GET_PIP_SHA256 b3153ec0cf7b7bbf9556932aa37e4981c35dc2a2c501d70d91d2795aa532be79
122123

123124
RUN set -ex; \
124125
\
@@ -160,7 +161,7 @@ RUN apt update \
160161

161162
# Adding useful packages for the image
162163
RUN apt update \
163-
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev -y --no-install-recommends \
164+
&& apt install gcc g++ libgomp1 libopenblas-dev libomp-dev graphviz -y --no-install-recommends \
164165
&& apt autoclean \
165166
&& apt clean \
166167
&& rm -rf /var/lib/apt/lists/*
@@ -169,9 +170,10 @@ RUN apt update \
169170
RUN savedAptMark="$(apt-mark showmanual)" \
170171
&& apt update \
171172
&& apt install gcc g++ curl wget make cmake git gfortran -y --no-install-recommends \
172-
&& git clone https://github.com/01org/mkl-dnn.git -b v0.21.5 --depth 1 \
173-
&& cd mkl-dnn/scripts && ./prepare_mkl.sh && cd .. \
174-
&& mkdir -p build && cd build && cmake .. && make \
173+
&& git clone https://github.com/01org/mkl-dnn.git -b v1.4 --depth 1 \
174+
&& cd mkl-dnn && mkdir -p build && cd build \
175+
&& cmake .. \
176+
&& make -j \
175177
&& make install \
176178
&& apt-mark auto '.*' > /dev/null \
177179
&& apt-mark manual $savedAptMark \

0 commit comments

Comments
 (0)