-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_dpg.sh
More file actions
executable file
·27 lines (20 loc) · 887 Bytes
/
install_dpg.sh
File metadata and controls
executable file
·27 lines (20 loc) · 887 Bytes
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
#!/usr/bin/env bash
# Install Dear PyGui and its dependencies 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 dearpygui is installed, install if missing
if ! run_python_in_active_env -c "import dearpygui" &> /dev/null; then
echo "Dear PyGui is not installed. Installing now..."
run_pip_in_active_env install dearpygui
fi
# Check if PIL/Pillow is installed, install if missing
if ! run_python_in_active_env -c "from PIL import Image" &> /dev/null; then
echo "Pillow is not installed. Installing now..."
run_pip_in_active_env install Pillow
fi
echo "All dependencies installed. You can now run the Dear PyGui UI with ./start-dpg-ui.sh"