-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
42 lines (33 loc) · 1.04 KB
/
install
File metadata and controls
42 lines (33 loc) · 1.04 KB
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
#!/bin/bash
# set python version
PYTHON="python3.12"
# deps
DEPS="$PYTHON $PYTHON-venv $PYTHON-tk unzip curl"
# check what flavor of linux and install deps
FAIL() { echo "Unsupported Linux distribution $1"; exit 1; }
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" == "ubuntu" ]; then
sudo apt-get update || exit 1
sudo apt-get install -y $DEPS || exit 1
elif [ "$ID" == "fedora" ]; then
sudo dnf install -y $DEPS || exit 1
elif [ "$ID" == "centos" ]; then
sudo yum install -y $DEPS || exit 1
elif [ "$ID" == "arch" ]; then
sudo pacman -SU --noconfirm $DEPS || exit 1
elif [ "$ID" == "manjaro" ]; then
sudo pacman -SU --noconfirm $DEPS || exit 1
else
FAIL "$ID"
fi
else
FAIL "$ID"
fi
# create virtual environment
$PYTHON -m venv --symlinks --clear venv || exit 1
. ./venv/bin/activate || exit 1
python -m pip install -r requirements.txt || exit 1
# download databases
chmod +x download_imdb_data.sh || exit 1
./download_imdb_data.sh || exit 1