-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall.sh
executable file
·56 lines (45 loc) · 1.67 KB
/
install.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
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status
# Source environment variables and activate virtual environment
echo "Sourcing environment variables and activating virtual environment..."
source setup_env.sh
# Install additional system dependencies (if needed)
echo "Installing additional system dependencies..."
sudo apt-get -y install libblas-dev nlohmann-json3-dev
# Initialize variables
DOWNLOAD_RESOURCES_FLAG=""
PYHAILORT_WHL=""
PYTAPPAS_WHL=""
INSTALL_TEST_REQUIREMENTS=false
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--pyhailort) PYHAILORT_WHL="$2"; shift ;;
--pytappas) PYTAPPAS_WHL="$2"; shift ;;
--test) INSTALL_TEST_REQUIREMENTS=true ;;
--all) DOWNLOAD_RESOURCES_FLAG="--all" ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done
# Install specified Python wheels
if [[ -n "$PYHAILORT_WHL" ]]; then
echo "Installing pyhailort wheel: $PYHAILORT_WHL"
pip install "$PYHAILORT_WHL"
fi
if [[ -n "$PYTAPPAS_WHL" ]]; then
echo "Installing pytappas wheel: $PYTAPPAS_WHL"
pip install "$PYTAPPAS_WHL"
fi
# Install test requirements if needed
if [[ "$INSTALL_TEST_REQUIREMENTS" == true ]]; then
echo "Installing test requirements..."
python3 -m pip install -r tests/test_resources/requirements.txt
fi
# Install the package using setup.py in editable mode
echo "Installing the package using setup.py in editable mode..."
python3 -m pip install -v -e .
# Download resources needed for the pipelines
echo "Downloading resources needed for the pipelines..."
./download_resources.sh $DOWNLOAD_RESOURCES_FLAG
echo "Installation completed successfully."