forked from zakaria/zenai-apc-ngoro
22 lines
701 B
Bash
Executable File
22 lines
701 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Setup Python venv for RK3588 NanoPi (ZenAI APC Ngoro)
|
|
set -euo pipefail
|
|
|
|
INSTALL_DIR="${INSTALL_DIR:-/opt/apc-ngoro}"
|
|
cd "$INSTALL_DIR"
|
|
|
|
if [ ! -f requirements.txt ]; then
|
|
echo "ERROR: requirements.txt not found in $INSTALL_DIR"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Creating venv with system-site-packages (required for rknn-toolkit-lite2)..."
|
|
python3 -m venv --system-site-packages venv
|
|
|
|
echo "Installing Python dependencies..."
|
|
PYTHONNOUSERSITE=1 venv/bin/pip install --upgrade pip
|
|
PYTHONNOUSERSITE=1 venv/bin/pip install -r requirements.txt
|
|
|
|
echo "Done. Activate with: source $INSTALL_DIR/venv/bin/activate"
|
|
echo "Remember to copy config.env.example to .env and edit device-specific values."
|