-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·79 lines (55 loc) · 1.98 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
set -e
echo "Beginning wallEYE Installation..."
user=$(whoami)
echo "Installing as ${user}"
# Python dependencies
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3.13 python3.13-venv python3.13-dev
cd ~
git clone https://github.com/strykeforce/wallEYE.git # -b Refactoring --single-branch
cd wallEYE/PiSideCode
python3.13 -m venv env
source env/bin/activate
wget https://bootstrap.pypa.io/get-pip.py
python3.13 get-pip.py
rm get-pip.py
python3.13 -m pip install --upgrade setuptools
python3.13 -m pip install -r requirements.txt
deactivate
# Dependencies
sudo apt install v4l-utils net-tools openssh-server
sudo apt install --reinstall linux-headers-$(uname -r)
sudo chmod 4755 /usr/sbin/ifconfig
sudo chmod 4755 /usr/sbin/ip
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install 20
echo "Node.js and npm version: $(node -v) $(npm -v)"
cd web_interface/walleye
npm install
# Service file
sudo bash -c "echo \"[Unit]
Description=WallEYE Vision System Service
After=default.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
WorkingDirectory=/home/${user}/wallEYE/PiSideCode
User=${user}
ExecStartPre=+/sbin/modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80
ExecStart=+/home/${user}/wallEYE/PiSideCode/env/bin/python3.13 /home/${user}/wallEYE/PiSideCode/init.py
[Install]
WantedBy=default.target\" > /etc/systemd/system/walleye.service"
sudo systemctl enable walleye
sudo systemctl start walleye
sudo chmod -R 777 "/home/${user}/wallEYE"
echo -e "\033[1;92m wallEYE Installation Complete!"
echo -e "\033[1;91m Remember to disable autosuspend / sync the clock"
echo -e "\033[1;91m Remember to disable autosuspend / sync the clock"
echo -e "\033[1;91m Remember to disable autosuspend / sync the clock"