From dc9ee1a96cb43c832af99f4636b7d1bef50a8b7a Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <mm@ucw.sh>
Date: Wed, 16 Sep 2020 17:25:13 +0200
Subject: [PATCH] [ubuntu,jupyterhub] unify pip and setuptools installation

---
 jupyterhub/base/Dockerfile | 7 ++++---
 ubuntu/Dockerfile          | 7 ++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/jupyterhub/base/Dockerfile b/jupyterhub/base/Dockerfile
index 95da6ab..c474724 100755
--- a/jupyterhub/base/Dockerfile
+++ b/jupyterhub/base/Dockerfile
@@ -44,9 +44,10 @@ RUN python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install \
 RUN mkdir -p /usr/local/venv && \
     python${JUPYTERHUB_PYTHON_VERSION} -m venv /usr/local/venv/default && \
     . /usr/local/venv/default/bin/activate && \
-    python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install --upgrade pip==20.2.3 && \
-    pip --no-cache-dir install --upgrade setuptools==49.1.0 && \
-    pip install tensorflow==1.15.3 && \
+    python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install --upgrade \
+        pip==${PYTHON_PIP_VERSION} \
+        setuptools==${PYTHON_SETUPTOOLS_VERSION} && \
+    pip --no-cache-dir install tensorflow==1.15.3 && \
     pip --no-cache-dir install \
         wheel \
         black \
diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile
index 6633b9e..4d041f8 100644
--- a/ubuntu/Dockerfile
+++ b/ubuntu/Dockerfile
@@ -105,4 +105,9 @@ RUN apt-get install -y \
 ADD agki-nas01.imp.fu-berlin.de-ca-cert.crt /usr/local/share/ca-certificates/agki-nas01.imp.fu-berlin.de-ca-cert.crt
 RUN update-ca-certificates
 COPY pip.conf /etc/
-RUN python3 -m pip install --upgrade pip==20.2.3
+
+ENV PYTHON_PIP_VERSION=20.2.3
+ENV PYTHON_SETUPTOOLS_VERSION=50.3.0
+RUN python3 -m pip install --upgrade \
+    pip==${PYTHON_PIP_VERSION} \
+    setuptools==${PYTHON_SETUPTOOLS_VERSION}
-- 
GitLab