-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixed_run_dpg_ui_v2.sh
More file actions
executable file
·30 lines (23 loc) · 1.04 KB
/
fixed_run_dpg_ui_v2.sh
File metadata and controls
executable file
·30 lines (23 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
#!/usr/bin/env bash
# Script to run the fixed DearPyGui UI for OneTrainer
set -e
echo "=== OneTrainer DearPyGui UI Fixed Launcher (v2) ==="
# 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 dearpygui is installed with the correct version
DPG_VERSION=$(run_python_in_active_env -c "import dearpygui; print(getattr(dearpygui, '__version__', 'unknown'))")
echo "DearPyGui version: $DPG_VERSION"
# Try installing a compatible version of dearpygui if needed
if [[ "$DPG_VERSION" == "2.0.0" ]]; then
echo "Detected DearPyGui 2.0.0 which may have compatibility issues."
echo "Installing a more compatible version (1.8.0)..."
run_pip_in_active_env install dearpygui==1.8.0
echo "Installed DearPyGui 1.8.0"
fi
# Run the UI with the fixed components
echo "Starting OneTrainer with Dear PyGui interface..."
run_python_in_active_env "./dpg_ui/app.py"