Skip to content

Commit 13e0a4f

Browse files
authored
[tensorflow][build] Install canonical openssl in TF 2.3 dockerfile (#859)
1 parent 20a3aa4 commit 13e0a4f

File tree

3 files changed

+6
-54
lines changed

3 files changed

+6
-54
lines changed

tensorflow/training/docker/2.3/py3/Dockerfile.cpu

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ ARG PYTHON=python3.7
2626
ARG PYTHON_PIP=python3-pip
2727
ARG PIP=pip3
2828
ARG PYTHON_VERSION=3.7.10
29-
ARG OPENSSL_VERSION=1.1.1g
3029

3130
ARG TF_URL=https://aws-tensorflow-binaries.s3-us-west-2.amazonaws.com/tensorflow/r2.3_aws/20201211-182958/cpu/py37/tensorflow_cpu-2.3.1-cp37-cp37m-linux_x86_64.whl
3231

@@ -44,7 +43,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4443
curl \
4544
emacs \
4645
git \
46+
libssl1.1 \
4747
libtemplate-perl \
48+
openssl \
4849
wget \
4950
vim \
5051
zlib1g-dev \
@@ -113,23 +114,6 @@ RUN ${PIP} --no-cache-dir install --upgrade \
113114
pip \
114115
setuptools
115116

116-
RUN wget -c https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
117-
&& apt remove -y --purge openssl \
118-
&& rm -rf /usr/include/openssl \
119-
&& apt-get update \
120-
&& apt-get install -y \
121-
ca-certificates \
122-
&& tar -xzvf openssl-${OPENSSL_VERSION}.tar.gz \
123-
&& cd openssl-${OPENSSL_VERSION} \
124-
&& ./config && make && make test \
125-
&& make install \
126-
&& ldconfig \
127-
&& cd .. && rm -rf openssl-*
128-
129-
# when we remove previous openssl, the ca-certificates pkgs and its symlinks gets deleted
130-
# causing sslcertverificationerror the below steps are to fix that
131-
RUN ln -s /etc/ssl/certs/*.* /usr/local/ssl/certs/
132-
133117
# Some TF tools expect a "python" binary
134118
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
135119
&& ln -s $(which ${PIP}) /usr/bin/pip

tensorflow/training/docker/2.3/py3/cu102/Dockerfile.gpu

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ ARG PYTHON=python3.7
2525
ARG PYTHON_PIP=python3-pip
2626
ARG PIP=pip3
2727
ARG PYTHON_VERSION=3.7.10
28-
ARG OPENSSL_VERSION=1.1.1i
2928
ARG OPEN_MPI_PATH=/usr/local
3029

3130
ARG TF_URL=https://aws-tensorflow-binaries.s3-us-west-2.amazonaws.com/tensorflow/r2.3_aws/20201211-182958/gpu/py37/tensorflow_gpu-2.3.1-cp37-cp37m-manylinux2010_x86_64.whl
@@ -62,6 +61,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends --allow-unauthe
6261
wget \
6362
vim \
6463
build-essential \
64+
libssl1.1 \
65+
openssl \
6566
openssh-client \
6667
openssh-server \
6768
zlib1g-dev \
@@ -161,23 +162,6 @@ RUN ${PIP} --no-cache-dir install --upgrade \
161162
pip \
162163
setuptools
163164

164-
RUN wget -c https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
165-
&& apt-get update \
166-
&& apt remove -y --purge openssl \
167-
&& rm -rf /usr/include/openssl \
168-
&& apt-get install -y \
169-
ca-certificates \
170-
&& tar -xzvf openssl-${OPENSSL_VERSION}.tar.gz \
171-
&& cd openssl-${OPENSSL_VERSION} \
172-
&& ./config && make && make test \
173-
&& make install \
174-
&& ldconfig \
175-
&& cd .. && rm -rf openssl-*
176-
177-
# when we remove previous openssl, the ca-certificates pkgs and its symlinks gets deleted
178-
# causing sslcertverificationerror the below steps are to fix that
179-
RUN ln -s /etc/ssl/certs/*.* /usr/local/ssl/certs/
180-
181165
# Some TF tools expect a "python" binary
182166
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
183167
&& ln -s $(which ${PIP}) /usr/bin/pip

tensorflow/training/docker/2.3/py3/cu110/Dockerfile.gpu

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ ARG PYTHON=python3.7
2626
ARG PYTHON_PIP=python3-pip
2727
ARG PIP=pip3
2828
ARG PYTHON_VERSION=3.7.10
29-
ARG OPENSSL_VERSION=1.1.1i
3029
ARG OPEN_MPI_PATH=/usr/local
3130

3231
ARG TF_URL=https://aws-tensorflow-binaries.s3-us-west-2.amazonaws.com/tensorflow/r2.3_aws_profiler/20201115-214803/gpu/py37/tensorflow_gpu-2.3.1-cp37-cp37m-manylinux2010_x86_64.whl
@@ -62,6 +61,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends --allow-unauthe
6261
libtool \
6362
vim \
6463
build-essential \
64+
libssl1.1 \
65+
openssl \
6566
openssh-client \
6667
openssh-server \
6768
zlib1g-dev \
@@ -167,23 +168,6 @@ RUN ${PIP} --no-cache-dir install --upgrade \
167168
pip \
168169
setuptools
169170

170-
RUN wget -c https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
171-
&& apt-get update \
172-
&& apt remove -y --purge openssl \
173-
&& rm -rf /usr/include/openssl \
174-
&& apt-get install -y \
175-
ca-certificates \
176-
&& tar -xzvf openssl-${OPENSSL_VERSION}.tar.gz \
177-
&& cd openssl-${OPENSSL_VERSION} \
178-
&& ./config && make && make test \
179-
&& make install \
180-
&& ldconfig \
181-
&& cd .. && rm -rf openssl-*
182-
183-
# when we remove previous openssl, the ca-certificates pkgs and its symlinks gets deleted
184-
# causing sslcertverificationerror the below steps are to fix that
185-
RUN ln -s /etc/ssl/certs/*.* /usr/local/ssl/certs/
186-
187171
# Some TF tools expect a "python" binary
188172
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
189173
&& ln -s $(which ${PIP}) /usr/bin/pip

0 commit comments

Comments
 (0)