arvbox now installs python tools with python3
authorPeter Amstutz <peter.amstutz@curii.com>
Wed, 26 Feb 2020 19:16:14 +0000 (14:16 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Wed, 26 Feb 2020 19:17:32 +0000 (14:17 -0500)
Also adjust 'geo' config for local/public mode.

refs #12409

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

tools/arvbox/lib/arvbox/docker/common.sh
tools/arvbox/lib/arvbox/docker/service/nginx/run
tools/arvbox/lib/arvbox/docker/service/sdk/run-service

index 77fb3f776030c6498640cdb924807dfaaf651629..9c933e870f375d540aef03742481b0484afa853f 100644 (file)
@@ -88,8 +88,8 @@ pip_install() {
     popd
 
     if [ "$PYCMD" = "python3" ]; then
-       if ! pip3 install --no-index --find-links /var/lib/pip $1 ; then
-            pip3 install $1
+       if ! pip3 install --prefix /usr/local --no-index --find-links /var/lib/pip $1 ; then
+            pip3 install --prefix /usr/local $1
        fi
     else
        if ! pip install --no-index --find-links /var/lib/pip $1 ; then
index 4fcc65fa9755e7a787db4b96d88df7b093b57cc3..d6fecb4436069e431f80682af5baf66f0d04bf82 100755 (executable)
@@ -14,6 +14,11 @@ if [[ $containerip != $localip ]] ; then
     fi
 fi
 
+geo_dockerip=
+if  [[ -f /var/run/localip_override ]] ; then
+    geo_dockerip="$dockerip/32 0;"
+fi
+
 openssl verify -CAfile $root_cert $server_cert
 
 cat <<EOF >/var/lib/arvados/nginx.conf
@@ -38,7 +43,7 @@ http {
       default     1;
       127.0.0.0/8 0;
       $containerip/32 0;
-      $dockerip/32 0;
+      $geo_dockerip
   }
 
   server {
index da6db3653cd9b48b3bea1570aa5006e173c6b319..8a36140bcfef84456e40aea8a3da6ccc63096894 100755 (executable)
@@ -18,6 +18,8 @@ cd /usr/src/arvados/sdk/cli
 run_bundler --binstubs=$PWD/binstubs
 ln -sf /usr/src/arvados/sdk/cli/binstubs/arv /usr/local/bin/arv
 
+export PYCMD=python3
+
 # Need to install the upstream version of pip because the python-pip package
 # shipped with Debian 9 is patched to change behavior in a way that breaks our
 # use case.
@@ -28,7 +30,9 @@ ln -sf /usr/src/arvados/sdk/cli/binstubs/arv /usr/local/bin/arv
 # multiple packages, because it will blindly install the latest version of each
 # dependency requested by each package, even if a compatible package version is
 # already installed.
-pip_install pip==9.0.3
+if ! pip3 install --no-index --find-links /var/lib/pip pip==9.0.3 ; then
+    pip3 install pip==9.0.3
+fi
 
 pip_install wheel