-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·32 lines (27 loc) · 920 Bytes
/
run.sh
File metadata and controls
executable file
·32 lines (27 loc) · 920 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
28
29
30
31
32
#!/bin/bash
# Change directory to the script's location
cd "$(dirname "$0")"
# Install UV if not already installed
uv_version=`uv -V`
if [ "$uv_version" = "" ]; then
echo "Installing UV..."
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
fi;
# Check for compatible GPU.
echo "Determining correct configuration for your GPU..."
torch_variant=`uv run --no-sync src/setup/probeGPU.py`
if [ "$torch_variant" = "" ]; then
torch_variant="cpu"
fi;
if [ "$torch_variant" = "cpu" ]; then
echo "Setup did not find a compatible GPU. Setup will continue with CPU-only dependencies. You can re-run after installing drivers to enable GPU support."
else
echo "Using torch variant: $torch_variant"
fi;
# Sync with final GPU configuration
uv sync --extra $torch_variant
# Run
echo "Starting Enhance AI..."
uv run --no-sync src/setup/lrcPath.py
uv run --no-sync src/main.py "$@"