From bf3c4e0abb286e4ed185aec92c72ce68df49fe14 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner <mm@ucw.sh> Date: Wed, 16 Sep 2020 17:31:09 +0200 Subject: [PATCH] [ubuntu,jupyterhub] update python installation --- jupyterhub/base/Dockerfile | 26 ++++++++++++-------------- ubuntu/Dockerfile | 22 ++++++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/jupyterhub/base/Dockerfile b/jupyterhub/base/Dockerfile index c474724..c8e927d 100755 --- a/jupyterhub/base/Dockerfile +++ b/jupyterhub/base/Dockerfile @@ -9,8 +9,6 @@ RUN apt-get update && \ curl && \ apt-get clean -ENV JUPYTERHUB_PYTHON_VERSION=3.8 - RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ apt-get update && \ apt-get install -y \ @@ -20,31 +18,31 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ openjdk-11-jre-headless && \ apt-get clean -RUN python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install \ +RUN python${PYTHON_VERSION} -m pip --no-cache-dir install \ jupyterlab \ jupyterhub \ ipympl \ && \ - python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install \ + python${PYTHON_VERSION} -m jupyter labextension install \ @jupyter-widgets/jupyterlab-manager && \ - python${JUPYTERHUB_PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab && \ - python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install \ + python${PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab && \ + python${PYTHON_VERSION} -m jupyter labextension install \ jupyter-webrtc \ ipyvolume \ jupyter-threejs \ jupyterlab-execute-time \ && \ - python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install @ryantam626/jupyterlab_code_formatter && \ - python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab_code_formatter && \ - python${JUPYTERHUB_PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab_code_formatter && \ - python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install black isort && \ - python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab-git && \ - python${JUPYTERHUB_PYTHON_VERSION} -m jupyter lab build + python${PYTHON_VERSION} -m jupyter labextension install @ryantam626/jupyterlab_code_formatter && \ + python${PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab_code_formatter && \ + python${PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab_code_formatter && \ + python${PYTHON_VERSION} -m pip --no-cache-dir install black isort && \ + python${PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab-git && \ + python${PYTHON_VERSION} -m jupyter lab build RUN mkdir -p /usr/local/venv && \ - python${JUPYTERHUB_PYTHON_VERSION} -m venv /usr/local/venv/default && \ + python${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 \ + python${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 && \ diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index e82b1c0..9828e9f 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -88,19 +88,21 @@ RUN apt-get update && \ && \ apt-get clean -RUN apt-get install -y \ - python3.8 \ - python3.8-dev \ - python3.8-venv \ - && \ - apt-get clean - 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/ +ENV PYTHON_VERSION=3.8 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} + +RUN apt-get install -y \ + python${PYTHON_VERSION} \ + python${PYTHON_VERSION}-dev \ + python${PYTHON_VERSION}-venv \ + && \ + apt-get clean && \ + python${PYTHON_VERSION} -m pip install --upgrade \ + pip==${PYTHON_PIP_VERSION} \ + setuptools==${PYTHON_SETUPTOOLS_VERSION} -- GitLab