From 9bb88a7c5ee68d9bb472ca75424e54395c84f51c Mon Sep 17 00:00:00 2001
From: Simon van Hemert <simon.vanhemert@hslu.ch>
Date: Tue, 8 Jun 2021 14:32:45 +0000
Subject: [PATCH] Update Dockerfile

---
 Dockerfile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index b02c627..1e4e1a1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,11 +5,6 @@ FROM ${RENKU_BASE_IMAGE}
 # see https://github.com/SwissDataScienceCenter/renkulab-docker
 # to swap this image for the latest version available
 
-# RENKU_VERSION determines the version of the renku CLI
-# that will be used in this image. To find the latest version,
-# visit https://pypi.org/project/renku/#history.
-ARG RENKU_VERSION=0.15.1
-
 # Uncomment and adapt if code is to be included in the image
 # COPY src /code/src
 
@@ -36,7 +31,17 @@ RUN conda env update -q -f /tmp/environment.yml && \
 RUN jupyter labextension install jupyterlab_tensorboard && \
     pip install jupyter-tensorboard==0.1.10
 
+# RENKU_VERSION determines the version of the renku CLI
+# that will be used in this image. To find the latest version,
+# visit https://pypi.org/project/renku/#history.
+ARG RENKU_VERSION=0.15.1
+
 ########################################################
 # Do not edit this section and do not add anything below
-RUN pipx install --force renku==${RENKU_VERSION}
+
+RUN if [ -n "$RENKU_VERSION" ] ; then \
+    pipx uninstall renku && \
+    pipx install --force renku==${RENKU_VERSION} \
+    ; fi
+
 ########################################################
-- 
GitLab