Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,24 @@ from huggingface_hub import snapshot_download
|
|
16 |
from model.model import MeshTransformer
|
17 |
from utils import apply_normalize, joint_filter, sample_pc
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
CONFIG_PATH = 'config/BPT-open-8k-8-16.yaml'
|
22 |
with open(CONFIG_PATH, "r") as f:
|
|
|
16 |
from model.model import MeshTransformer
|
17 |
from utils import apply_normalize, joint_filter, sample_pc
|
18 |
|
19 |
+
def install_cuda_toolkit():
|
20 |
+
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
21 |
+
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
22 |
+
CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
23 |
+
subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
|
24 |
+
subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
|
25 |
+
subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
|
26 |
+
|
27 |
+
os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
28 |
+
os.environ["PATH"] = "%s/bin:%s" % (os.environ["CUDA_HOME"], os.environ["PATH"])
|
29 |
+
os.environ["LD_LIBRARY_PATH"] = "%s/lib:%s" % (
|
30 |
+
os.environ["CUDA_HOME"],
|
31 |
+
"" if "LD_LIBRARY_PATH" not in os.environ else os.environ["LD_LIBRARY_PATH"],
|
32 |
+
)
|
33 |
+
# Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
|
34 |
+
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
35 |
+
|
36 |
+
install_cuda_toolkit()
|
37 |
|
38 |
CONFIG_PATH = 'config/BPT-open-8k-8-16.yaml'
|
39 |
with open(CONFIG_PATH, "r") as f:
|