From 9d125418b656b7c556acddaf8d837fa20ed26e0e Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Fri, 27 Aug 2021 23:03:29 +0000 Subject: [PATCH 1/2] Fix TLS error when upgrading nvidia packages. We used to download the nvidia packages using apt over http. However this is not supported anymore causing a build failure. I found that `apt` was failing to connect over https to the NVIDIA download servers because of the `libgnutls.so` included in conda which was used in place of the default version when we updated the `LD_LIBRARY_PATH`. See the bug below for full context. http://b/197989446 --- Dockerfile | 11 +++-------- gpu.Dockerfile | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 860781d2..eeaf64f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,13 +11,8 @@ ADD clean-layer.sh /tmp/clean-layer.sh ADD patches/nbconvert-extensions.tpl /opt/kaggle/nbconvert-extensions.tpl ADD patches/template_conf.json /opt/kaggle/conf.json -# This is necessary for apt to access HTTPS sources -RUN apt-get update && \ - apt-get install apt-transport-https && \ - /tmp/clean-layer.sh - - # Use a fixed apt-get repo to stop intermittent failures due to flaky httpredir connections, - # as described by Lionel Chan at http://stackoverflow.com/a/37426929/5881346 +# Use a fixed apt-get repo to stop intermittent failures due to flaky httpredir connections, +# as described by Lionel Chan at http://stackoverflow.com/a/37426929/5881346 RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list && \ apt-get update && \ # Needed by vowpalwabbit & lightGBM (GPU build). @@ -30,7 +25,7 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list & /tmp/clean-layer.sh # Make sure the dynamic linker finds the right libstdc++ -ENV LD_LIBRARY_PATH=/opt/conda/lib +ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/opt/conda/lib # b/128333086: Set PROJ_LIB to points to the proj4 cartographic library. ENV PROJ_LIB=/opt/conda/share/proj diff --git a/gpu.Dockerfile b/gpu.Dockerfile index 76075cca..4db3b9b5 100644 --- a/gpu.Dockerfile +++ b/gpu.Dockerfile @@ -9,8 +9,6 @@ ADD clean-layer.sh /tmp/clean-layer.sh COPY --from=nvidia /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/ COPY --from=nvidia /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/ COPY --from=nvidia /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/cuda.gpg -# See b/142337634#comment28 -RUN sed -i 's/deb https:\/\/developer.download.nvidia.com/deb http:\/\/developer.download.nvidia.com/' /etc/apt/sources.list.d/*.list ENV CUDA_MAJOR_VERSION=11 ENV CUDA_MINOR_VERSION=0 From eef0d5935b4536632b0abeee3f7a748117e75b6f Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Tue, 31 Aug 2021 16:57:59 +0000 Subject: [PATCH 2/2] pin kornia and gensim --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index eeaf64f0..1aa55f47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,8 @@ RUN pip install tensorflow==${TENSORFLOW_VERSION} && \ RUN apt-get install -y libfreetype6-dev && \ apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \ - pip install gensim && \ + # b/198300835 kornia 4.1.0 is not compatible with our version of numpy. + pip install gensim==4.0.1 && \ pip install textblob && \ pip install wordcloud && \ pip install xgboost && \ @@ -299,7 +300,8 @@ RUN pip install bleach && \ pip install notebook && \ pip install papermill && \ pip install olefile && \ - pip install kornia && \ + # b/198300835 kornia 0.5.10 is not compatible with our version of numpy. + pip install kornia==0.5.8 && \ pip install pandas_summary && \ pip install pandocfilters && \ pip install pexpect && \