new
Browse files
app.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
import spaces
|
2 |
import os
|
|
|
|
|
|
|
3 |
import imageio
|
4 |
import numpy as np
|
5 |
import torch
|
@@ -29,9 +32,9 @@ import tempfile
|
|
29 |
from huggingface_hub import hf_hub_download
|
30 |
|
31 |
def install_cuda_toolkit():
|
32 |
-
print("==> install cuda 118")
|
33 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
34 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
|
|
35 |
CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
36 |
subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
|
37 |
subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
|
|
|
1 |
import spaces
|
2 |
import os
|
3 |
+
os.environ["CXX"] = os.popen("which g++").read().strip()
|
4 |
+
os.environ["CC"] = os.popen("which gcc").read().strip()
|
5 |
+
|
6 |
import imageio
|
7 |
import numpy as np
|
8 |
import torch
|
|
|
32 |
from huggingface_hub import hf_hub_download
|
33 |
|
34 |
def install_cuda_toolkit():
|
|
|
35 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
36 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
37 |
+
print(f"==> install cuda {CUDA_TOOLKIT_URL}")
|
38 |
CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
39 |
subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
|
40 |
subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
|