fix viseron
This commit is contained in:
parent
a459cad99a
commit
106cf2e22d
@ -14,7 +14,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt-get install -y \
|
||||||
python3 python3-pip python3-venv \
|
python3 python3-pip python3-venv \
|
||||||
libgl1 libglib2.0-0 \
|
libgl1 libglib2.0-0 \
|
||||||
libsm6 libxext6 libxrender-dev \
|
libsm6 libxext6 libxrender-dev \
|
||||||
@ -35,7 +35,9 @@ $STD apt install -y \
|
|||||||
libgirepository1.0-dev libcairo2-dev pkg-config \
|
libgirepository1.0-dev libcairo2-dev pkg-config \
|
||||||
libopenblas-dev liblapack-dev \
|
libopenblas-dev liblapack-dev \
|
||||||
libxss1 \
|
libxss1 \
|
||||||
libasound2
|
libasound2 \
|
||||||
|
libpq-dev \
|
||||||
|
cmake build-essential
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
mkdir -p ~/.config/pip
|
mkdir -p ~/.config/pip
|
||||||
@ -46,15 +48,21 @@ EOF
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Python Environment"
|
msg_info "Setting up Python Environment"
|
||||||
cd /opt
|
python3 -m venv /opt/viseron-venv
|
||||||
python3 -m venv viseron
|
source /opt/viseron-venv/bin/activate
|
||||||
source viseron/bin/activate
|
|
||||||
pip install --upgrade pip setuptools wheel
|
pip install --upgrade pip setuptools wheel
|
||||||
msg_ok "Python Environment Setup"
|
msg_ok "Python Environment Setup"
|
||||||
|
|
||||||
msg_info "Installing Viseron"
|
msg_info "Installing Viseron"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/roflcoopter/viseron/releases/latest | jq -r '.tag_name')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/roflcoopter/viseron/releases/latest | jq -r '.tag_name')
|
||||||
pip install viseron==${RELEASE#v}
|
curl -fsSL "https://github.com/roflcoopter/viseron/archive/refs/tags/${RELEASE}.tar.gz" -o /tmp/viseron.tar.gz
|
||||||
|
mkdir -p /opt/viseron
|
||||||
|
tar -xzf /tmp/viseron.tar.gz --strip-components=1 -C /opt/viseron
|
||||||
|
rm /tmp/viseron.tar.gz
|
||||||
|
cd /opt/viseron
|
||||||
|
source /opt/viseron-venv/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
pip install .
|
||||||
msg_ok "Installed Viseron $RELEASE"
|
msg_ok "Installed Viseron $RELEASE"
|
||||||
|
|
||||||
msg_info "Creating Configuration Directory"
|
msg_info "Creating Configuration Directory"
|
||||||
@ -128,8 +136,8 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/viseron
|
WorkingDirectory=/opt/viseron
|
||||||
Environment=PATH=/opt/viseron/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
Environment=PATH=/opt/viseron-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
ExecStart=/opt/viseron/bin/viseron --config /config/viseron.yaml
|
ExecStart=/opt/viseron-venv/bin/python -m viseron --config /config/viseron.yaml
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user