CollinMa's picture
Publish NExT-GPT course code and actual execution records
15c46ce verified
Raw History Blame Contribute Delete
541 Bytes
"""Container startup. Paid hardware is never provisioned by this script."""
import os
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
os.chdir(ROOT)
if os.getenv("NEXTGPT_AUTO_PREPARE", "0") == "1":
import torch
if not torch.cuda.is_available():
raise SystemExit("AUTO_PREPARE=1 requires a CUDA GPU. No weights downloaded.")
subprocess.run([sys.executable, "scripts/prepare_weights.py", "--merge-vicuna"], check=True)
os.execv(sys.executable, [sys.executable, "app.py"])