From 38a7ee5c13b754eb54caae5075789ec89798167e Mon Sep 17 00:00:00 2001
From: Stefano Alberto Russo <stefano.russo@gmail.com>
Date: Tue, 28 Sep 2021 22:03:44 +0200
Subject: [PATCH] Disabled automatically activating the Python environments.

---
 base/entrypoint/Dockerfile    | 6 ++++--
 base/entrypoint/entrypoint.sh | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/base/entrypoint/Dockerfile b/base/entrypoint/Dockerfile
index 866c981..188b614 100644
--- a/base/entrypoint/Dockerfile
+++ b/base/entrypoint/Dockerfile
@@ -17,8 +17,10 @@ RUN chmod 755 /entrypoint.sh
 # Set entrypoint
 ENTRYPOINT ["/entrypoint.sh"]
 
-# Fix line in the lofar init. TODO: check why!!
-RUN grep -v "measures.directory" /opt/lofar/init.sh > /tmp/init.sh && mv /tmp/init.sh /opt/lofar/init.sh && chmod 755 /opt/lofar/init.sh
+# Fix lines in the lofar init. TODO: check why!!
+RUN grep -v "measures.directory" /opt/lofar/init.sh > /tmp/init.sh
+RUN grep -v "pyenv-py2/bin/activate" /tmp/init.sh > /opt/lofar/init.sh
+RUN chmod 755 /opt/lofar/init.sh
 
 #=============================
 # Switch to metauser
diff --git a/base/entrypoint/entrypoint.sh b/base/entrypoint/entrypoint.sh
index 5f34c86..4524883 100644
--- a/base/entrypoint/entrypoint.sh
+++ b/base/entrypoint/entrypoint.sh
@@ -113,6 +113,9 @@ else
     echo "=============================================================="
     echo ""
     echo "You are now in /home/metauser with write access as user \"$(whoami)\"."
+    echo "To activate Python environments:"
+    echo "    source /opt/lofar/pyenv-py2/bin/activate"
+    echo "    source /opt/lofar/pyenv-py3/bin/activate"
     echo ""
     echo "Remember that contents inside this container, unless stored"
     echo "on a persistent volume mounted from you host machine, will"
-- 
GitLab