diff --git a/bin/verticapylab b/bin/verticapylab index 1e206bc7..5bc19997 100755 --- a/bin/verticapylab +++ b/bin/verticapylab @@ -164,33 +164,33 @@ Host $VERTICA_HOST_NAME $SSH_CONFIG_EXTRA_HOSTNAME User dbadmin " | docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" bash -c 'umask 077; mkdir -p $HOME/.ssh; cat >> $HOME/.ssh/config' -if [[ $(tr '[:lower:]' '[:upper:]'<<< ${TEST_MODE}) == "YES" ]] ; then - trap ' tput setaf 1; echo "VerticaPy installation failed"; tput sgr0; ' EXIT - - echo "Installing Git" - if docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" bash -c 'apt-get update -yqq; apt-get install -yqq git 1> /dev/null' 2> /dev/null; then - echo "Git installed!" - else - docker stop "$VERTICAPYLAB_CONTAINER_NAME" - exit 1 - fi - echo "Uninstalling old VerticaPy" - docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" pip uninstall --yes verticapy 2> /dev/null - echo "Installing latest VerticaPy" - if docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" pip install -q git+https://github.com/vertica/VerticaPy 2> /dev/null; then - echo "Installation done!" - else - docker stop "$VERTICAPYLAB_CONTAINER_NAME" - exit 1 - fi - trap EXIT +trap ' tput setaf 1; echo "VerticaPy installation failed"; tput sgr0; ' EXIT - tput setaf 2 - echo "VerticaPy installed successfully" - tput sgr0 +echo "Installing Git" +if docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" bash -c 'apt-get update -yqq; apt-get install -yqq git 1> /dev/null' 2> /dev/null; then + echo "Git installed!" +else + docker stop "$VERTICAPYLAB_CONTAINER_NAME" + exit 1 +fi +echo "Uninstalling old VerticaPy" +docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" pip uninstall --yes verticapy 2> /dev/null +echo "Installing latest VerticaPy" +if docker exec -i "$VERTICAPYLAB_CONTAINER_NAME" pip install -q git+https://github.com/vertica/VerticaPy 2> /dev/null; then + echo "Installation done!" +else + docker stop "$VERTICAPYLAB_CONTAINER_NAME" + exit 1 fi +trap EXIT + +tput setaf 2 +echo "VerticaPy installed successfully" +tput sgr0 + + echo "Starting..." # sleep some time to wait for jupyterlab logs timeout=10 #seconds