-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dpg-ui.sh
More file actions
executable file
·22 lines (16 loc) · 698 Bytes
/
start-dpg-ui.sh
File metadata and controls
executable file
·22 lines (16 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# Start the Dear PyGui UI for OneTrainer
set -e
# Use python3 as backup if python command isn't available
if ! command -v python &> /dev/null && command -v python3 &> /dev/null; then
export OT_PYTHON_CMD="python3"
fi
source "${BASH_SOURCE[0]%/*}/lib.include.sh"
prepare_runtime_environment
# Check if dependencies are installed, install if missing
if ! run_python_in_active_env -c "import dearpygui" &> /dev/null || ! run_python_in_active_env -c "from PIL import Image" &> /dev/null; then
echo "Some dependencies are missing. Running installation script..."
"${BASH_SOURCE[0]%/*}/install_dpg.sh"
fi
# Launch the UI
run_python_in_active_env "dpg_ui/app.py" "$@"