File size: 753 Bytes
b842f07
 
 
bd32e29
 
 
 
 
 
 
 
b842f07
bd32e29
b842f07
bd32e29
b842f07
bd32e29
b842f07
 
bd32e29
b842f07
 
 
 
 
bd32e29
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
import subprocess
import os

def run_command(cmd):
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"Error running command: {' '.join(cmd)}")
        print(result.stderr)
    else:
        print(result.stdout)

# Install the correct version of pygit2
run_command(["pip", "install", "pygit2==1.15.1"])

# Clone the repository if it doesn't already exist
repo_url = "https://github.com/lllyasviel/Fooocus.git"
repo_dir = "/home/user/app/Fooocus"

if not os.path.exists(repo_dir):
    run_command(["git", "clone", repo_url, repo_dir])

# Change to the cloned directory
os.chdir(repo_dir)

# Run the python script
run_command(["python", "entry_with_update.py", "--share", "--always-high-vram"])