From 8aa2a6a21f83e8d8a6038e534bcb00802858ff14 Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Wed, 10 Mar 2021 22:17:04 +0000 Subject: [PATCH 1/2] Upgrade base image to m64. - Pin pyproj since 3.x is not compatible with latest version of basemap yet. - Improved the basemap test. http://b/182405233 --- Dockerfile | 7 ++++--- tensorflow-whl/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f1a9122..df762f58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_TAG=m61 +ARG BASE_TAG=m64 ARG TENSORFLOW_VERSION=2.4.1 FROM gcr.io/kaggle-images/python-tensorflow-whl:${TENSORFLOW_VERSION}-py37 as tensorflow_whl @@ -39,8 +39,9 @@ RUN conda config --add channels conda-forge && \ conda config --add channels pytorch && \ conda config --add channels rapidsai && \ # ^ rapidsai is the highest priority channel, default lowest, conda-forge 2nd lowest. - # 161473620#comment7 pin required to prevent resolver from picking pysal 1.x., pysal 2.2.x is also downloading data on import. - conda install matplotlib basemap cartopy python-igraph imagemagick "pysal==2.1.0" && \ + # b/182405233 pyproj 3.x is not compatible with basemap 1.2.1 + # b/161473620#comment7 pin required to prevent resolver from picking pysal 1.x., pysal 2.2.x is also downloading data on import. + conda install matplotlib basemap cartopy python-igraph imagemagick "pyproj=2.6" "pysal==2.1.0" && \ conda install "pytorch=1.7" "torchvision=0.8" "torchaudio=0.7" "torchtext=0.8" cpuonly && \ /tmp/clean-layer.sh diff --git a/tensorflow-whl/Dockerfile b/tensorflow-whl/Dockerfile index ad159e87..d2ff3de4 100644 --- a/tensorflow-whl/Dockerfile +++ b/tensorflow-whl/Dockerfile @@ -1,5 +1,5 @@ FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 AS nvidia -FROM gcr.io/deeplearning-platform-release/base-cpu:m61 +FROM gcr.io/deeplearning-platform-release/base-cpu:m64 # Avoid interactive configuration prompts/dialogs during apt-get. ENV DEBIAN_FRONTEND=noninteractive From fcece8944a317e56eb19d03000d0cf0505c359af Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Wed, 10 Mar 2021 22:18:18 +0000 Subject: [PATCH 2/2] improve basemap test --- tests/test_matplotlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_matplotlib.py b/tests/test_matplotlib.py index 4b2605ec..b20b45d0 100644 --- a/tests/test_matplotlib.py +++ b/tests/test_matplotlib.py @@ -14,5 +14,5 @@ def test_plot(self): self.assertTrue(os.path.isfile("plot1.png")) def test_basemap(self): - Basemap(width=100,height=100,projection='aeqd', - lat_0=40,lon_0=-105) + m = Basemap(width=100,height=100,projection='aeqd', lat_0=40,lon_0=-105) + self.assertEqual(0, m.xmin)