Spaces:
Running
on
Zero
Running
on
Zero
install cuda toolkit
Browse files
app.py
CHANGED
@@ -28,6 +28,20 @@ from ultralytics import YOLO
|
|
28 |
LIGHT_PURPLE=(0.25098039, 0.274117647, 0.65882353)
|
29 |
STEEL_BLUE=(0.2745098, 0.5098039, 0.7058824)
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
os.system("cd /home/user/app/hort/models/tgs/models/snowflake/pointnet2_ops_lib && python setup.py install && cd /home/user/app")
|
32 |
wilor_checkpoint_path = hf_hub_download(repo_id="zerchen/hort_models", filename="wilor_final.ckpt")
|
33 |
hort_checkpoint_path = hf_hub_download(repo_id="zerchen/hort_models", filename="hort_final.pth.tar")
|
|
|
28 |
LIGHT_PURPLE=(0.25098039, 0.274117647, 0.65882353)
|
29 |
STEEL_BLUE=(0.2745098, 0.5098039, 0.7058824)
|
30 |
|
31 |
+
|
32 |
+
def install_cuda_toolkit():
|
33 |
+
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run"
|
34 |
+
CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
35 |
+
print("start to download cuda toolkit")
|
36 |
+
os.system(f"wget -q {CUDA_TOOLKIT_URL} -O {CUDA_TOOLKIT_FILE}")
|
37 |
+
os.system(f"chmod +x {CUDA_TOOLKIT_FILE}")
|
38 |
+
print("start to install cuda toolkit")
|
39 |
+
os.system("{CUDA_TOOLKIT_FILE} --silent --toolkit")
|
40 |
+
os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
41 |
+
|
42 |
+
|
43 |
+
install_cuda_toolkit()
|
44 |
+
print("start to install pointnet++")
|
45 |
os.system("cd /home/user/app/hort/models/tgs/models/snowflake/pointnet2_ops_lib && python setup.py install && cd /home/user/app")
|
46 |
wilor_checkpoint_path = hf_hub_download(repo_id="zerchen/hort_models", filename="wilor_final.ckpt")
|
47 |
hort_checkpoint_path = hf_hub_download(repo_id="zerchen/hort_models", filename="hort_final.pth.tar")
|