From 3fca195fa67026c24130bcb92a7413bd6a5dc8a8 Mon Sep 17 00:00:00 2001 From: Michael <m.langguth@fz-juelich.de> Date: Thu, 28 Oct 2021 17:17:56 +0200 Subject: [PATCH] Bugfix to use bash-shell in install_venv_container.sh. --- video_prediction_tools/env_setup/install_venv_container.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/video_prediction_tools/env_setup/install_venv_container.sh b/video_prediction_tools/env_setup/install_venv_container.sh index 5ca6efe9..b989eea6 100755 --- a/video_prediction_tools/env_setup/install_venv_container.sh +++ b/video_prediction_tools/env_setup/install_venv_container.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # # __authors__ = Bing Gong, Michael Langguth # __date__ = '2021_10_28' @@ -21,7 +22,7 @@ if [ -z "${SINGULARITY_NAME}" ]; then fi # check if directory to virtual environment is parsed -if [[ -z "$1" ]]; then +if [ -z "$1" ]; then echo "ERROR: Provide a name to set up the virtual environment." return fi @@ -42,13 +43,14 @@ fi # create basic target directory for virtual environment mkdir "${VENV_BASE}" # Install virtualenv in this directory +echo "Installing virtualenv under ${VENV_BASE}..." pip install --target="${VENV_BASE}/" virtualenv # Change into the directory... cd "${VENV_BASE}" || exit # .. to set-up virtual environment therein python -m virtualenv -p /usr/bin/python --system-site-packages "${VENV_NAME}" # Activate virtual environment and install required packages -echo "Actiavting virtual environment ${ENV_DIR} to install required Python modules..." +echo "Actiavting virtual environment ${VENV_NAME} to install required Python modules..." source "${VENV_DIR}/bin/activate" pip install -r "${BASE_DIR}/requirements_container.txt" -- GitLab