tranny / app.py
Mbonea's picture
added app file and made changes to dockerfile
c17ee23
raw
history blame
506 Bytes
import subprocess
def run_command(command):
try:
output = subprocess.check_output(
command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
print(output)
except subprocess.CalledProcessError as e:
print(
f"Command execution failed with return code {e.returncode}: {e.output}")
# Example usage
command = "uvicorn App.app:app --host 0.0.0.0 --port 7860 & celery -A App.Worker.celery worker -c 1 --loglevel=info"
run_command(command)