|
import subprocess |
|
|
|
|
|
commands = [ |
|
"pip install pygit2==1.12.2", |
|
"cd /content", |
|
"git clone https://github.com/lllyasviel/Fooocus.git", |
|
"cd /content/Fooocus", |
|
"python entry_with_update.py --share" |
|
] |
|
|
|
for command in commands: |
|
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) |
|
output, error = process.communicate() |
|
|
|
|
|
if process.returncode != 0: |
|
print(f"Error executing command: {command}") |
|
print(f"Error message: {error}") |
|
else: |
|
print(f"Output of command: {command}") |
|
print(output) |
|
|