-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathinstall_EasyVVUQ.sh
executable file
·59 lines (46 loc) · 1.88 KB
/
install_EasyVVUQ.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Exit immediately if any command fails
set -e
# Define colors for output (native Bash ANSI escape codes)
GREEN="\e[32m"
BLUE="\e[34m"
YELLOW="\e[33m"
RED="\e[31m"
BOLD="\e[1m"
RESET="\e[0m"
# Function to print section headers
print_header() {
echo -e "\n${BOLD}${BLUE}=============================================="
echo -e " $1 "
echo -e "==============================================${RESET}\n"
}
# Step 1: Define the directory for the virtual environment
VENV_DIR="./.venv"
REQUIREMENTS_FILE="requirements.txt"
print_header "Starting EasyVVUQ Installation"
# Step 2: Create a virtual environment in the EasyVVUQ directory
echo -e "${YELLOW}Creating a virtual environment in the EasyVVUQ directory...${RESET}"
python3 -m venv $VENV_DIR
# Step 3: Activate the virtual environment
echo -e "${YELLOW}Activating the virtual environment...${RESET}"
source $VENV_DIR/bin/activate
# Inform the user about activation for future use
echo -e "${GREEN}Note:${RESET} To use EasyVVUQ in this virtual environment later, run:"
echo -e " ${BOLD}source $VENV_DIR/bin/activate${RESET}\n"
# Step 4: Upgrade essential tools
print_header "Upgrading Pip, Setuptools, and Wheel"
pip install --upgrade pip setuptools wheel
# Step 5: Install dependencies from requirements.txt
if [ -f "$REQUIREMENTS_FILE" ]; then
print_header "Installing Dependencies from requirements.txt"
pip install -r $REQUIREMENTS_FILE
else
echo -e "${RED}Error:${RESET} requirements.txt not found in the EasyVVUQ directory!"
exit 1
fi
# Step 6: Test the EasyVVUQ installation
print_header "Testing EasyVVUQ Installation"
python -c "import easyvvuq; print('EasyVVUQ version:', easyvvuq.__version__)"
print_header "Installation Completed Successfully!"
echo -e "${GREEN}Reminder:${RESET} Activate the virtual environment before using EasyVVUQ:"
echo -e " ${BOLD}source $VENV_DIR/bin/activate${RESET}\n"