-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
41 lines (31 loc) · 970 Bytes
/
run.sh
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
33
34
35
36
37
38
39
40
41
#!/bin/bash
VENV_DIR=.venv
sudo apt-get install python3.10 python3.10-venv
# Check if .venv exists
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment..."
python3 -m venv $VENV_DIR
fi
# Activate the virtual environment
source $VENV_DIR/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install specific packages
echo "Installing required packages..."
pip install xformers==0.0.26post1 torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
# Install tkinter
echo "Installing tkinter..."
sudo apt-get install python3.10-tk
# Install additional requirements
if [ -f requirements.txt ]; then
echo "Installing additional requirements..."
pip install -r requirements.txt
else
echo "requirements.txt not found, skipping..."
fi
# Launch the script
echo "Launching LightDiffusion..."
python3.10 ./modules/GUI.py
# Deactivate the virtual environment
deactivate